Version 1.1 with TZ/NTP delay moved.

Changed to make Timezone and NTP test on Watchy reset do it once and if it succeeds or fails, won't try again for 4 hours.
This commit is contained in:
GuruSR 2021-10-15 11:42:01 -04:00 committed by GitHub
parent de5cd64532
commit 3bb705824a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1096,7 +1096,6 @@ void WatchyGSR::ProcessNTP(){
break;
}
WatchTime.UTC_RAW = time(nullptr);
NTPData.Last = WatchTime.UTC_RAW;
tmElements_t TM;
breakTime(WatchTime.UTC_RAW,TM);
RTC.write(TM);
@ -1110,6 +1109,7 @@ void WatchyGSR::ProcessNTP(){
NTPData.Wait = 0;
NTPData.Pause = 0;
NTPData.State = 0;
NTPData.Last = WatchTime.UTC_RAW; // Moved from section 6 to here, to limit the atttempts.
NTPData.UpdateUTC = false;
NTPData.TimeZone = false;
Battery.UpCount=0; // Stop it from thinking the battery went wild.