From 088c8e2e35072a282640ab70aeb98a2ac7c02795 Mon Sep 17 00:00:00 2001 From: philmoz Date: Fri, 21 Feb 2025 11:54:10 +1100 Subject: [PATCH] fix(color): timer widget displays wrong UI for count up timers (#5935) --- radio/src/gui/colorlcd/widgets/timer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/src/gui/colorlcd/widgets/timer.cpp b/radio/src/gui/colorlcd/widgets/timer.cpp index 426ba5037..78e635c6a 100644 --- a/radio/src/gui/colorlcd/widgets/timer.cpp +++ b/radio/src/gui/colorlcd/widgets/timer.cpp @@ -137,7 +137,7 @@ class TimerWidget : public Widget lv_label_set_text(unit0, sUnit0); lv_label_set_text(unit1, sUnit1); - if (lastValue > 0) { + if (lastValue > 0 && lastStartValue > 0) { lv_obj_clear_flag(timerArc, LV_OBJ_FLAG_HIDDEN); timerIcon->hide(); } else { @@ -209,7 +209,7 @@ class TimerWidget : public Widget protected: tmrval_t lastValue = 0; - uint32_t lastStartValue = 0; + uint32_t lastStartValue = -1; bool isLarge = false; lv_style_t style; lv_obj_t* nameLabel = nullptr;