From 8e1f2a3a8775f5802f24e6bf9a3e8951f8cf5943 Mon Sep 17 00:00:00 2001 From: pelgraine <140762863+pelgraine@users.noreply.github.com> Date: Thu, 19 Mar 2026 17:05:40 +1100 Subject: [PATCH] t5s3 - last heard touch fix; lock screen 15 min refresh fix; update firmware build date --- examples/companion_radio/MyMesh.h | 2 +- examples/companion_radio/main.cpp | 6 +++++- examples/companion_radio/ui-new/UITask.cpp | 18 +++++++++++++++++- examples/companion_radio/ui-new/UITask.h | 2 ++ 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/examples/companion_radio/MyMesh.h b/examples/companion_radio/MyMesh.h index d935bf2..40b9b08 100644 --- a/examples/companion_radio/MyMesh.h +++ b/examples/companion_radio/MyMesh.h @@ -8,7 +8,7 @@ #define FIRMWARE_VER_CODE 10 #ifndef FIRMWARE_BUILD_DATE -#define FIRMWARE_BUILD_DATE "18 March 2026" +#define FIRMWARE_BUILD_DATE "19 March 2026" #endif #ifndef FIRMWARE_VERSION diff --git a/examples/companion_radio/main.cpp b/examples/companion_radio/main.cpp index ac562f3..0533ac8 100644 --- a/examples/companion_radio/main.cpp +++ b/examples/companion_radio/main.cpp @@ -588,7 +588,11 @@ static void lastHeardToggleContact() { ui_task.showAlert(alertBuf, 1500); Serial.printf("[LastHeard] Added: %s\n", entry->name); } else { - ui_task.showAlert("Blob not found", 1500); + // Blob store is limited to 100 entries — with many contacts, blobs + // from non-contact nodes get evicted quickly. User needs to wait + // for the node to re-broadcast its advert. + ui_task.showAlert("Advert expired, wait for re-broadcast", 2500); + Serial.printf("[LastHeard] Blob evicted for %s (store full)\n", entry->name); } } ui_task.forceRefresh(); diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 849d101..245eb57 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -507,7 +507,7 @@ public: "Tap here for full Last Heard list"); #else display.drawTextCentered(display.width() / 2, display.height() - 24, - "Press H: Full Last Heard list"); + "H: Full Last Heard list"); #endif } else if (_page == HomePage::RADIO) { display.setColor(DisplayDriver::YELLOW); @@ -1682,6 +1682,21 @@ if (curr) curr->poll(); } } } + + // Lock screen clock refresh — update time display every 15 minutes. + // Runs outside the _display->isOn() gate so it works even after auto-off. + // Wakes the display briefly to render, then lets auto-off turn it back off. + if (_locked && _display != NULL) { + const unsigned long LOCK_REFRESH_INTERVAL = 15UL * 60UL * 1000UL; // 15 minutes + if (millis() - _lastLockRefresh >= LOCK_REFRESH_INTERVAL) { + _lastLockRefresh = millis(); + if (!_display->isOn()) { + _display->turnOn(); + _auto_off = millis() + 5000; // Stay on just long enough to render + settle + } + _next_refresh = 0; // Trigger immediate render + } + } #endif #ifdef PIN_VIBRATION @@ -1809,6 +1824,7 @@ void UITask::lockScreen() { #endif _next_refresh = 0; // Draw lock screen immediately _auto_off = millis() + 60000; // 60s before display off while locked + _lastLockRefresh = millis(); // Start 15-min clock refresh cycle Serial.println("[UI] Screen locked"); } diff --git a/examples/companion_radio/ui-new/UITask.h b/examples/companion_radio/ui-new/UITask.h index 0e08ed2..23001fd 100644 --- a/examples/companion_radio/ui-new/UITask.h +++ b/examples/companion_radio/ui-new/UITask.h @@ -97,6 +97,7 @@ class UITask : public AbstractUITask { UIScreen* _screenBeforeLock = nullptr; bool _locked = false; unsigned long _lastInputMillis = 0; // Auto-lock idle tracking + unsigned long _lastLockRefresh = 0; // Periodic lock screen clock update VirtualKeyboard _vkb; bool _vkbActive = false; @@ -107,6 +108,7 @@ class UITask : public AbstractUITask { UIScreen* _screenBeforeLock = nullptr; bool _locked = false; unsigned long _lastInputMillis = 0; // Auto-lock idle tracking + unsigned long _lastLockRefresh = 0; // Periodic lock screen clock update #endif void userLedHandler();