From 66714856d89af856f97ad04e1d974b067d2056b3 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 11 Sep 2025 12:42:36 +0300 Subject: [PATCH] Redraw date/time every minute --- main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/main.c b/main.c index 3aea4c4..e85dcee 100644 --- a/main.c +++ b/main.c @@ -304,6 +304,18 @@ static THD_FUNCTION(Thread1, arg) } } } + +#ifdef __USE_RTC__ + static uint32_t minutes; + const uint32_t tr = rtc_get_tr_bin(); + const uint32_t now = RTC_TR_MIN(tr); + + if (minutes != now) { + minutes = now; + redraw_request |= REDRAW_CAL_STATUS; + } +#endif // __USE_RTC__ + // plot trace and other indications as raster draw_all(completed); // flush markmap only if scan completed to prevent // remaining traces