On/Off Road - init

This commit is contained in:
Rick Lan
2025-04-08 18:10:55 +08:00
parent c85f3eab3f
commit 4534c16197
4 changed files with 25 additions and 1 deletions
+5 -1
View File
@@ -207,6 +207,8 @@ def hardware_thread(end_event, hw_queue) -> None:
fan_controller = None
dp_device_go_off_road = False
while not end_event.is_set():
sm.update(PANDA_STATES_TIMEOUT)
@@ -342,7 +344,9 @@ def hardware_thread(end_event, hw_queue) -> None:
pass
# Handle offroad/onroad transition
should_start = all(onroad_conditions.values())
if count % 6 == 0:
dp_device_go_off_road = params.get_bool("dp_device_go_off_road")
should_start = not dp_device_go_off_road and all(onroad_conditions.values())
if started_ts is None:
should_start = should_start and all(startup_conditions.values())