From 60b4e99bbd602ff0116e43527fa2d5884af04389 Mon Sep 17 00:00:00 2001 From: Nicu Hodos Date: Tue, 25 Mar 2025 13:48:15 +0100 Subject: [PATCH] display timer even if it's below 0, but not negative - for the use case where sensor or date are displayed during timer --- include/display.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/display.h b/include/display.h index 0399df6..4101cde 100644 --- a/include/display.h +++ b/include/display.h @@ -79,10 +79,8 @@ namespace Display { }); Task tDisplayTimer(SECONDS(10), TASK_ONCE + 1, []{ - if (timer >= 0) { - clockDisplay.print(timer, DEC); - clockDisplay.writeDisplay(); - } + clockDisplay.print(timer > 0 ? timer : 0, DEC); + clockDisplay.writeDisplay(); }, &ts, false, nullptr, []{ if (!displayTask.isPerm(tDisplayTimer)) displayTask.restorePerm();