From cbb4820d85ecab0cbf1f2e7b70ad68feeaea5e4e Mon Sep 17 00:00:00 2001 From: Olivier Mehani Date: Wed, 26 Oct 2022 23:31:36 +1100 Subject: [PATCH] fixup! Add opion to vibrate every hour (and on reset) --- src/Watchy.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Watchy.cpp b/src/Watchy.cpp index e26479a..a005180 100644 --- a/src/Watchy.cpp +++ b/src/Watchy.cpp @@ -12,7 +12,6 @@ RTC_DATA_ATTR bool BLE_CONFIGURED; RTC_DATA_ATTR weatherData currentWeather; RTC_DATA_ATTR int weatherIntervalCounter = -1; RTC_DATA_ATTR bool displayFullInit = true; -RTC_DATA_ATTR bool alreadyVibrated = false; void Watchy::init(String datetime) { esp_sleep_wakeup_cause_t wakeup_reason; @@ -32,12 +31,9 @@ void Watchy::init(String datetime) { RTC.read(currentTime); showWatchFace(true); // partial updates on tick if (settings.vibrateOClock) { - if (currentTime.Minute == 0 - && !alreadyVibrated) { + if (currentTime.Minute == 0) { + // The RTC wakes us up once per minute vibMotor(75, 4); - alreadyVibrated = true; - } else { - alreadyVibrated = false; } } }