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

* controlsd: allow mismatch while boardd reads back mode

* self
old-commit-hash: b28daef34a
This commit is contained in:
Adeeb Shihadeh 2024-02-18 14:43:42 -08:00 committed by GitHub
parent 55a38aeb69
commit 8b8677ae63
1 changed files with 2 additions and 1 deletions

View File

@ -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: