fix on off road

This commit is contained in:
Comma Device
2026-03-08 00:26:53 +08:00
parent 557e753897
commit f1d490ceee
25 changed files with 208 additions and 204 deletions

View File

@@ -330,6 +330,10 @@ def hardware_thread(end_event, hw_queue) -> None:
# ensure device is fully booted
startup_conditions["device_booted"] = startup_conditions.get("device_booted", False) or HARDWARE.booted()
offroad_mode = params.get_bool("ForceOffroad")
startup_conditions["not_always_offroad"] = not offroad_mode
onroad_conditions["not_always_offroad"] = not offroad_mode
# if the temperature enters the danger zone, go offroad to cool down
onroad_conditions["device_temp_good"] = thermal_status < ThermalStatus.danger
extra_text = f"{offroad_comp_temp:.1f}C"