From 0b1bec0ae95d6c466bc69b59d66dc204277f0660 Mon Sep 17 00:00:00 2001 From: "Brendan M. Sleight" Date: Sun, 28 Aug 2022 13:31:23 +0000 Subject: [PATCH] Fixing initial value of hour_adjusted --- src/displayapp/screens/WatchFaceAccurateWords.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/displayapp/screens/WatchFaceAccurateWords.cpp b/src/displayapp/screens/WatchFaceAccurateWords.cpp index 02ddde7d..dd55ed3c 100644 --- a/src/displayapp/screens/WatchFaceAccurateWords.cpp +++ b/src/displayapp/screens/WatchFaceAccurateWords.cpp @@ -103,7 +103,7 @@ void WatchFaceAccurateWords::Refresh() { uint8_t hour = time.hours().count(); uint8_t minute = time.minutes().count(); - uint8_t hour_adjusted = time.hours().count(); + uint8_t hour_adjusted; char words[78]; char part_day[20]; const char hour_word_array[26][10] = { @@ -145,9 +145,13 @@ void WatchFaceAccurateWords::Refresh() { if (displayedHour != hour || displayedMinute != minute) { displayedHour = hour; displayedMinute = minute; + if(minute>32) { hour_adjusted = (hour+1) % 24; - } + } + else { + hour_adjusted = hour; + } if (hour_adjusted != 0 && hour_adjusted != 12) { sprintf(part_day, "%s", part_day_word_array[hour_adjusted/3]);