From 4aba015a03f0b38b3e4b7fec84299d51807859e9 Mon Sep 17 00:00:00 2001 From: etwasmitbaum <47484288+etwasmitbaum@users.noreply.github.com> Date: Mon, 28 Jun 2021 22:26:05 +0200 Subject: [PATCH] fixed typo and small logical mistake --- src/Watchy.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Watchy.cpp b/src/Watchy.cpp index 40bdc00..e9a1e83 100644 --- a/src/Watchy.cpp +++ b/src/Watchy.cpp @@ -10,7 +10,7 @@ RTC_DATA_ATTR bool WIFI_CONFIGURED; RTC_DATA_ATTR bool BLE_CONFIGURED; RTC_DATA_ATTR weatherData currentWeather; RTC_DATA_ATTR int weatherIntervalCounter = WEATHER_UPDATE_INTERVAL; -RTC_DARA_ATTR int ntpSyncTimeCounter = NTP_TIME_SYNC_INTERVAL; +RTC_DATA_ATTR int ntpSyncTimeCounter = NTP_TIME_SYNC_INTERVAL; String getValue(String data, char separator, int index) { @@ -108,8 +108,6 @@ void Watchy::syncNtpTime(){ // shut down the radio to save power WiFi.mode(WIFI_OFF); btStop(); - } else { - ntpSyncTimeCounter = ntpSyncTimeCounter + WEATHER_UPDATE_INTERVAL; } } @@ -684,6 +682,7 @@ weatherData Watchy::getWeatherData(){ weatherIntervalCounter = 0; }else{ weatherIntervalCounter++; + ntpSyncTimeCounter = ntpSyncTimeCounter + WEATHER_UPDATE_INTERVAL; } return currentWeather; }