mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-02 12:02:09 +08:00
controlsd: check self.enabled out of the any() (#23507)
old-commit-hash: 48b6dfa15de1bf8157288ea06114ab5418f2650c
This commit is contained in:
@@ -390,7 +390,7 @@ class Controls:
|
||||
self.mismatch_counter = 0
|
||||
|
||||
# All pandas not in silent mode must have controlsAllowed when openpilot is enabled
|
||||
if any(not ps.controlsAllowed and self.enabled for ps in self.sm['pandaStates']
|
||||
if self.enabled and any(not ps.controlsAllowed for ps in self.sm['pandaStates']
|
||||
if ps.safetyModel not in IGNORED_SAFETY_MODES):
|
||||
self.mismatch_counter += 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user