void TestProtocol::checkGPS() { addState(GPSWaiting); checkGPSTimer->setSingleShot(true); connect(checkGPSTimer, &QTimer::timeout, [=]() { addState(GPSReady); addState(GPSHasTime); addState(GPSHasPos); removeState(GPSWaiting); emit positionAvailable(DEFAULT_LATITUDE, DEFAULT_LONGITUDE, DEFAULT_ALTITUDE); emit checkedGPS(true); }); checkGPSTimer->start(2000); }
bool MapRobotObject::compare(const MapObject &other) const { bool ret = false; const MapRobotObject* lob = dynamic_cast<const MapRobotObject*>(&other); if (lob) { ret = orientationAvaliable() == lob->orientationAvaliable() && positionAvailable() == lob->positionAvailable() && orientation() == lob->orientation() && state() == lob->state() && robotID() == lob->robotID() && consoleID() == lob->consoleID(); } return ret; }