From a69ecd9d14f634b9767b40a6bc5ce03cd5d5edea Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Fri, 23 Oct 2026 22:33:52 +0200 Subject: [PATCH] feat(ui): UI_NO_HIBERNATE hides the Hibernate row Upstream's flag (meshcore-dev/MeshCore#3290, already set on the L1 OLED builds) did nothing in the Solo UI. The L1 has a power switch; a pocket could hibernate it by mistake from the Shutdown page. Co-Authored-By: Claude Opus 5.5 --- docs/solo/getting-started.md | 2 +- examples/companion_radio/ui-new/HomeScreen.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/solo/getting-started.md b/docs/solo/getting-started.md index f2edf502..8c46a145 100644 --- a/docs/solo/getting-started.md +++ b/docs/solo/getting-started.md @@ -40,7 +40,7 @@ order: | **Map** | Your position, the trail, people sharing theirs and the target ([Navigation](./navigation.md#map)) | | **Tools** | All tools, then the two you used last with their state | | **Messages** | All messages, then the two latest conversations with their unread counts | -| **Shutdown** | Lock the screen, or hibernate (with the battery level) | +| **Shutdown** | Lock the screen, or hibernate (with the battery level). The Wio Tracker L1 (OLED) has a power switch instead, so it has no Hibernate row | Most pages are **quick panels**: a few rows, the first of which opens the full screen, the rest shortcuts. **Up / Down** picks a row and **Enter** acts diff --git a/examples/companion_radio/ui-new/HomeScreen.h b/examples/companion_radio/ui-new/HomeScreen.h index 109a72ca..10379866 100644 --- a/examples/companion_radio/ui-new/HomeScreen.h +++ b/examples/companion_radio/ui-new/HomeScreen.h @@ -359,12 +359,14 @@ class HomeScreen : public UIScreen { } } else if (page == SHUTDOWN) { add("Lock screen", Q_VALUE, QA_LOCK, 0); +#ifndef UI_NO_HIBERNATE // a board with a power switch (the L1): a pocket can't hibernate it by mistake add("Hibernate", Q_VALUE, QA_HIBERNATE, 0); // The charge left, which is what you weigh before switching off. const int mv = _task->getBattMilliVolts(); snprintf(rows[n - 1].value, sizeof(rows[0].value), "%d%%%s", battery::percent(mv, _node_prefs ? (int)_node_prefs->low_batt_mv : 0), board.isExternalPowered() ? " USB" : ""); +#endif } return n; }