mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-09-15 03:53:43 +08:00
On/Off Road - init
This commit is contained in:
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user