From 3bb705824a6f906ad447cced0c15dbb72b144eaa Mon Sep 17 00:00:00 2001 From: GuruSR Date: Fri, 15 Oct 2021 11:42:01 -0400 Subject: [PATCH] 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. --- src/Watchy_GSR.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Watchy_GSR.cpp b/src/Watchy_GSR.cpp index 8846a47..bb37d35 100644 --- a/src/Watchy_GSR.cpp +++ b/src/Watchy_GSR.cpp @@ -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.