controlsd: check self.enabled out of the any() (#23507)

local_plotjuggler
Dean Lee 2022-01-13 18:53:04 +08:00 committed by GitHub
parent 9e1428fd84
commit 48b6dfa15d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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