fix reconnect gamepad

This commit is contained in:
2022-12-13 16:26:28 +01:00
parent f14992c040
commit 1f80548797
10 changed files with 99 additions and 43 deletions
+3 -3
View File
@@ -80,13 +80,13 @@ void Navigation::loop() {
this->updateCurrentLocation();
std::cout << "duration between: " << millis() - lastTime << std::endl;
lastTime = millis();
} else if (millis() - lastTime > 20000) {
std::cout << "Keine Daten mehr!" << std::endl;
} else if (millis() - lastTime > 20000 && !this->gps->getGnssFixOk()) {
std::cout << "No Data from ZED arrived since a long time. Navigation::loop" << std::endl;
this->gps->flushPVT();
this->gps->softwareResetGNSSOnly();
lastTime = millis();
// std::cout
//std::cout
// << "checkUblox: " << this->gps->checkUblox() << " -|- "
// << "getGnssFixOk: " << this->gps->getGnssFixOk() << " -|- "
// << "getHWstatus: " << this->gps->getHWstatus() << " -|- "