From 2b7fc37491f001e32179759b6b14315e13bb02db Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Sat, 23 May 2026 10:06:22 +0200 Subject: [PATCH] fix(eink): 30s clock/lock refresh, static auto-advert indicator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Clock page: 60s → 30s refresh (time shown without seconds, 30s is sufficient) - Lock screen: 60s → 30s refresh - Auto-advert "A" indicator: remove blink on e-ink (always shown when active); blink preserved on OLED via EINK_DISPLAY_MODEL guard Co-Authored-By: Claude Sonnet 4.6 --- examples/companion_radio/ui-new/UITask.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 2efa459c..0203f572 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -347,10 +347,15 @@ class HomeScreen : public UIScreen { } leftmostX = btX - ind_gap; - // "A" indicator — left of BT, blinks 50% duty at 4s period + // "A" indicator — left of BT; blinks on OLED, always shown on e-ink if (_node_prefs && _node_prefs->advert_auto_interval_sec > 0) { int aX = leftmostX - ind; - if ((millis() % 4000) < 2000) { +#ifdef EINK_DISPLAY_MODEL + bool show_a = true; +#else + bool show_a = (millis() % 4000) < 2000; +#endif + if (show_a) { display.setColor(DisplayDriver::LIGHT); display.fillRect(aX, 0, ind, lh); display.setColor(DisplayDriver::DARK); @@ -768,7 +773,7 @@ public: } bool auto_adv = _node_prefs && _node_prefs->advert_auto_interval_sec > 0; #ifdef EINK_DISPLAY_MODEL - if (_page == HomePage::CLOCK) return 60000; // no seconds on e-ink; content changes at most every minute + if (_page == HomePage::CLOCK) return 30000; // no seconds on e-ink; refresh every 30s return 30000; // e-ink: limit base polling; new messages still force immediate refresh via notify() #else if (_page == HomePage::CLOCK) { @@ -1484,7 +1489,7 @@ void UITask::loop() { _display->print(hint); _display->endFrame(); #ifdef EINK_DISPLAY_MODEL - _next_refresh = millis() + 60000; + _next_refresh = millis() + 30000; #else _next_refresh = millis() + 1000; #endif