hardwared: don't ignore quick ignition cycles (#32938)

* check on either edge

* clean up

* clean up

* good thing I tested this first :P
This commit is contained in:
Shane Smiskol 2024-07-11 02:49:42 -07:00 committed by GitHub
parent b247c3caaa
commit 11db7b683b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -230,8 +230,8 @@ def hardware_thread(end_event, hw_queue) -> None:
onroad_conditions["ignition"] = False
cloudlog.error("panda timed out onroad")
# Run at 2Hz, plus rising edge of ignition
ign_edge = started_ts is None and onroad_conditions["ignition"]
# Run at 2Hz, plus either edge of ignition
ign_edge = (started_ts is not None) != onroad_conditions["ignition"]
if (sm.frame % round(SERVICE_LIST['pandaStates'].frequency * DT_HW) != 0) and not ign_edge:
continue