From 9d038730df744dc99a7285e6b17d8ee998051bb1 Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Mon, 25 May 2026 09:24:36 +0200 Subject: [PATCH] fix(ui): force 1 s home-refresh while trail tracking, matching auto-advert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The status-bar G/A indicators both flip every 2 s (millis() % 4000 < 2000), but with only auto-advert forcing the 1 s refresh, a screen with G alone repainted every 5 s — the blink looked sparse vs A. Treat any blinking indicator (auto_adv OR trail active) as needing the 1 s cadence on OLED. E-ink builds keep the 30 s home refresh — blink is gated to "always on" there via Features::BLINK_INDICATORS = false. Co-Authored-By: Claude Sonnet 4.6 --- examples/companion_radio/ui-new/UITask.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 0c4c726e..153c961e 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -903,15 +903,17 @@ public: } } bool auto_adv = _node_prefs && _node_prefs->advert_auto_interval_sec > 0; + // Any blinking status-bar indicator needs a 1 s refresh to animate evenly. + bool need_blink = auto_adv || _task->trail().isActive(); if (Features::IS_EINK) { // slow display: poll every 30 s; inbound msgs force immediate refresh via notify() return Features::HOME_REFRESH_MS; } if (_page == HomePage::CLOCK) { bool show_sec = !_node_prefs || !_node_prefs->clock_hide_seconds; - return auto_adv ? 1000 : (show_sec ? 1000 : 60000); + return need_blink ? 1000 : (show_sec ? 1000 : 60000); } - return auto_adv ? 1000 : 5000; + return need_blink ? 1000 : 5000; } bool handleInput(char c) override {