| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 | 
							- #include "Ego.h"
 
- // start -> login -> OnSigin -> OnCarConnect -> OnRobot -> OnCarLeave
 
- // -> OnNotifyDel
 
- void CEgoNotify::OnSigin(bool bRet) {
 
-    
 
-    
 
-     emit egoLoginResult(bRet);
 
-     //emit egoMoveEnd(10004, WorkArea::Area_F, 32);
 
- }
 
- void CEgoNotify::OnRobot(std::unique_ptr<UserCamera> &info) {
 
-   UserCamera users;
 
-   users.uid = info->uid;
 
-   users.name = info->name;
 
-   users.type = info->type;
 
-   users.state = info->state;
 
-   users.carType = info->carType;
 
-   //_users.push_back(users);
 
-   emit egoCarAppend(users);
 
-   
 
-  
 
- }
 
- void CEgoNotify::OnNotifyDel(int32_t peer) {
 
-   qDebug() << "OnNotifyDel";
 
-   emit egoNotifyDel(peer);
 
- }
 
- void CEgoNotify::OnNotifyRadar(int32_t r0, int32_t r1, int32_t r2, int32_t r3,
 
-                                int32_t r4, int32_t r5,int32_t r6) {
 
-   emit egoRadar(r0, r1, r2, r3, r4, r5,r6);
 
- }
 
- void CEgoNotify::OnNotifyEncode(int32_t left, int32_t right)
 
- {
 
-     emit egoEncode(left, right);
 
- }
 
- //void CEgoNotify::OnNotifyIMU() {}
 
- void CEgoNotify::OnNotifyPing(int32_t value,double temp) { emit egoPing(value,temp); }
 
- void CEgoNotify::OnNotifyKickOff() {
 
-   qDebug() << "kick off";
 
-   emit egoKickoff();
 
- }
 
- void CEgoNotify::OnNotifyMoveEnd(int32_t rid, WorkArea area, int32_t no)
 
- {
 
-     emit egoMoveEnd(rid, area, no);
 
- }
 
- void CEgoNotify::OnNotifyMoveRet(MoveDesc desc)
 
- {
 
-     emit egoMoveRet(desc);
 
- }
 
- // 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::OnNotifyFeed(const FeedData& data)
 
- {
 
-     emit egoFeedData(data);
 
- }
 
- 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);
 
- }
 
- void CEgoNotify::OnNDTPos(Position* pos)
 
- {
 
-     emit egoPosition(pos->x, pos->y, pos->z);
 
- }
 
 
  |