From 1d480761bd5f90d110896f98cc92648ed937c1cb Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 11 Jul 2024 02:49:42 -0700 Subject: [PATCH] hardwared: don't ignore quick ignition cycles (#32938) * check on either edge * clean up * clean up * good thing I tested this first :P old-commit-hash: 11db7b683b4ea0427c0060b48bd17ac5b61b11ff --- system/hardware/hardwared.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/hardware/hardwared.py b/system/hardware/hardwared.py index e3a4c8171..ff34d9582 100755 --- a/system/hardware/hardwared.py +++ b/system/hardware/hardwared.py @@ -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