From 99b17ac1bc60d278a1494f0bcaac18a95397f59a Mon Sep 17 00:00:00 2001 From: Hector van der Aa Date: Tue, 24 Mar 2026 18:15:24 +0100 Subject: [PATCH] Timing fixes in message system --- src/modules/lcd/lcd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/lcd/lcd.h b/src/modules/lcd/lcd.h index c9e41e9..ced4c0d 100644 --- a/src/modules/lcd/lcd.h +++ b/src/modules/lcd/lcd.h @@ -286,7 +286,7 @@ int lcd::loop(unsigned long timeout_ms) { if (_msg_duration == 0) { _msg_duration == 1; } - _hold_till_frame = _frame_ctr + 1 + _msg_duration; + _hold_till_frame = _frame_ctr + _msg_duration; break; default: @@ -301,7 +301,7 @@ int lcd::loop(unsigned long timeout_ms) { return 1; } - if (_frame_ctr == _hold_till_frame) { + if (_hold_till_frame >= 0 && _frame_ctr >= _hold_till_frame) { _screen = _previous_screen; _hold_till_frame = -1; }