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
@@ -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;
}