12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #include <stdint.h>
- #include <memory>
- #include "../common/comm.h"
- #include "Ego.h"
- // start -> login -> OnSigin -> OnCarConnect -> OnRobot -> OnCarLeave
- // -> OnNotifyDel
- void CEgoNotify::OnLogin(bool bRet) {
-
-
- emit egoLoginResult(bRet);
- //emit egoMoveEnd(10004, WorkArea::Area_F, 32);
- }
- void CEgoNotify::OnRobot(std::unique_ptr<UserDriver> &info) {
- UserDriver users;
- users.uid = info->uid;
- users.name = info->name;
- users.type = info->type;
- users.state = info->state;
-
- //_users.push_back(users);
- emit egoCarAppend(users);
-
-
- }
- void CEgoNotify::OnNotifyDel(int32_t peer) {
- qDebug() << "OnNotifyDel";
- emit egoNotifyDel(peer);
- }
-
- // void CEgoNotify::OnEmergency(bool enable, bool motor, bool gear, bool turnl, bool turnR) {
- //
- // }
- // void CEgoNotify::OnAccel(int16_t accel, bool onoff)
- // {
- //
- // }
- // void CEgoNotify::OnSteer(uint64_t steer)
- // {
- //
- // }
- // void CEgoNotify::OnArm(int16_t flip, int16_t armL, int16_t armR, bool onoff)
- // {
- //
- // }
- void CEgoNotify::OnNotifyLeave(int32_t peer)
- {
- emit egoNotifyLeave(peer);
- }
- void CEgoNotify::OnNotifyState(int32_t uid, UserState state)
- {
- /*
- for (auto& node : _users)
- {
- if (node.uid == uid)
- {
- node.state = state;
- break;
- }
- }
- */
- emit egoNotifyState(uid,state);
- }
- void CEgoNotify::OnNotifyVideoFail(int32_t uid)
- {
- emit egoNotifyFail(uid);
- }
-
|