From 48b6dfa15de1bf8157288ea06114ab5418f2650c Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Thu, 13 Jan 2022 18:53:04 +0800 Subject: [PATCH] controlsd: check self.enabled out of the any() (#23507) --- selfdrive/controls/controlsd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index bca730c1b3..3d94405c48 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -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