From ee7299fb4e8581514a80812ef61dcc5135aeb2e1 Mon Sep 17 00:00:00 2001 From: GuruSR Date: Fri, 5 Nov 2021 11:34:01 -0400 Subject: [PATCH] Version 1.2.1. --- src/Watchy_GSR.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Watchy_GSR.cpp b/src/Watchy_GSR.cpp index a447718..86db067 100644 --- a/src/Watchy_GSR.cpp +++ b/src/Watchy_GSR.cpp @@ -71,6 +71,7 @@ RTC_DATA_ATTR struct TimeData { String LastYear; unsigned long EPSMS; // Milliseconds (rounded to the enxt minute) when the clock was updated via NTP. bool NewMinute; // Set to True when New Minute happens. + time_t TravelTest; // For Travel Testing. } WatchTime; RTC_DATA_ATTR struct Countdown { @@ -2076,19 +2077,18 @@ void WatchyGSR::UpdateClock(){ // Manage time will determine if the RTC is in use, will also set a flag to "New Minute" for the loop functions to see the minute change. void WatchyGSR::ManageTime(){ - tmElements_t TM; - time_t TT; + tmElements_t TM; // struct tm * tm; int I; if (WatchTime.EPSMS < millis()){ // Deal with NTPData.TimeTest. if (NTPData.TimeTest){ - TT = WatchTime.UTC_RAW + 60; // Add the minute. - UpdateUTC(); NTPData.TestCount++; + UpdateUTC(); + if (NTPData.TestCount == 1) WatchTime.TravelTest = WatchTime.UTC_RAW + 60; // Add the minute. if (NTPData.TestCount > 1){ I = Options.Drift; if (NTPData.NTPDone){ - Options.Drift = (TT - WatchTime.UTC_RAW); + Options.Drift = (WatchTime.TravelTest - WatchTime.UTC_RAW); Options.UsingDrift = (Options.Drift != 0); if (Menu.Item == MENU_TOFF) Menu.SubItem = 3; NTPData.TimeTest = false;