Skip to content

Commit

Permalink
add stupid time validation workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexLynd committed Aug 5, 2023
1 parent 37f7ede commit 88a5b8a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Wardriver/src/Wardriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void initGPS() {
Screen::drawMockup("...","...",sats,totalNets,openNets,clients,bat,speed,"GPS: Initializing...");

unsigned long startGPSTime = millis();
while (! (gps.location.isValid() && gps.time.isValid())) {
while (! (gps.location.isValid())) {
if (millis()-startGPSTime > 5000 && gps.charsProcessed() < 10) {
Screen::drawMockup("...","...",sats,totalNets,openNets,clients,bat,speed,"GPS: NOT FOUND");
}
Expand All @@ -106,7 +106,12 @@ void initGPS() {
Serial.println(gps.location.isValid());
delay(0); smartDelay(500);
}
while (! (gps.date.year() == 2000)) {
Screen::drawMockup("...","...",sats,totalNets,openNets,clients,bat,speed,"GPS: Waiting for time...");
delay(0); smartDelay(500);
}
Screen::drawMockup("...","...",sats,totalNets,openNets,clients,bat,speed,"GPS: LOCATION FOUND");

updateGPS();
}

Expand Down

0 comments on commit 88a5b8a

Please sign in to comment.