5-state display mode: auto day/night, nightrider, screen off

New ScreenDisplayMode param (fixes ScreenDisaplayMode typo):
  0=auto-normal, 1=auto-nightrider, 2=normal, 3=screen-off, 4=nightrider

Nightrider mode: black background (no camera feed), path/lane lines
drawn as 2px outlines only. Auto mode uses NOAA solar position calc
in gpsd to switch between day/night based on GPS lat/lon and UTC time.
First calc on GPS fix, then every 30 seconds.

Button cycle onroad: 0→4, 1→2, 2→3, 3→4, 4→2 (never back to auto).
Offroad: any→3, 3→0. bench_cmd debugbutton simulates the button press.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-13 06:49:38 +00:00
parent d801177d2a
commit 5b91dac33e
7 changed files with 164 additions and 44 deletions

View File

@@ -94,8 +94,8 @@ void HomeWindow::updateState(const UIState &s) {
// CLEARPILOT: honor display on/off while showing splash in park
if (parked && ready->isVisible()) {
int screenMode = paramsMemory.getInt("ScreenDisaplayMode");
if (screenMode == 1) {
int screenMode = paramsMemory.getInt("ScreenDisplayMode");
if (screenMode == 3) {
Hardware::set_display_power(false);
} else {
Hardware::set_display_power(true);