controlsd: allow mismatch while boardd reads back mode (#31505)

* controlsd: allow mismatch while boardd reads back mode

* self
old-commit-hash: b28daef34a
pull/32199/head
Adeeb Shihadeh 2 years ago committed by GitHub
parent 55a38aeb69
commit 8b8677ae63
  1. 3
      selfdrive/controls/controlsd.py

@ -312,7 +312,8 @@ class Controls:
else:
safety_mismatch = pandaState.safetyModel not in IGNORED_SAFETY_MODES
if safety_mismatch or pandaState.safetyRxChecksInvalid or self.mismatch_counter >= 200:
# safety mismatch allows some time for boardd to set the safety mode and publish it back from panda
if (safety_mismatch and self.sm.frame*DT_CTRL > 10.) or pandaState.safetyRxChecksInvalid or self.mismatch_counter >= 200:
self.events.add(EventName.controlsMismatch)
if log.PandaState.FaultType.relayMalfunction in pandaState.faults:

Loading…
Cancel
Save