From 49ba4c29aef0e6b5d17ce9e01f48ea45cadd3643 Mon Sep 17 00:00:00 2001 From: Ryan Rix Date: Thu, 12 Oct 2023 13:19:48 -0700 Subject: [PATCH] fix watchface bug when the time is almost top of the hour --- src/displayapp/screens/WatchFaceFuzzy.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/displayapp/screens/WatchFaceFuzzy.cpp b/src/displayapp/screens/WatchFaceFuzzy.cpp index 226ca495..54238d20 100644 --- a/src/displayapp/screens/WatchFaceFuzzy.cpp +++ b/src/displayapp/screens/WatchFaceFuzzy.cpp @@ -131,6 +131,7 @@ char const* WatchFaceFuzzy::nums[] = {"twelve", "one", "two", "three", "four", " void WatchFaceFuzzy::printTimeWords(int h, int m) { const char* mod; + if (m <= 30) { mod = mods[m / 5]; } else { @@ -138,9 +139,11 @@ void WatchFaceFuzzy::printTimeWords(int h, int m) { } h = (h % 12); - if (m == 0 || m < 4 || m > 56) { + if (m >= 56) { + sprintf(timeStr, "#ffffff nearly %s#\n#808080 o' clock#", nums[(h+1) % 12]); + } + else if (m == 0 || m <= 4) { sprintf(timeStr, "#ffffff %s#\n#808080 o' clock#", nums[h]); - } else if (m <= 32) {