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 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-23 22:33:52 +02:00
co-authored by Claude Opus 5.5
parent d2e1f086e2
commit a69ecd9d14
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ order:
| **Map** | Your position, the trail, people sharing theirs and the target ([Navigation](./navigation.md#map)) | | **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 | | **Tools** | All tools, then the two you used last with their state |
| **Messages** | All messages, then the two latest conversations with their unread counts | | **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 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 full screen, the rest shortcuts. **Up / Down** picks a row and **Enter** acts
@@ -359,12 +359,14 @@ class HomeScreen : public UIScreen {
} }
} else if (page == SHUTDOWN) { } else if (page == SHUTDOWN) {
add("Lock screen", Q_VALUE, QA_LOCK, 0); 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); add("Hibernate", Q_VALUE, QA_HIBERNATE, 0);
// The charge left, which is what you weigh before switching off. // The charge left, which is what you weigh before switching off.
const int mv = _task->getBattMilliVolts(); const int mv = _task->getBattMilliVolts();
snprintf(rows[n - 1].value, sizeof(rows[0].value), "%d%%%s", snprintf(rows[n - 1].value, sizeof(rows[0].value), "%d%%%s",
battery::percent(mv, _node_prefs ? (int)_node_prefs->low_batt_mv : 0), battery::percent(mv, _node_prefs ? (int)_node_prefs->low_batt_mv : 0),
board.isExternalPowered() ? " USB" : ""); board.isExternalPowered() ? " USB" : "");
#endif
} }
return n; return n;
} }