From 5c381641c08961676a56a9718fbdaa84989ac249 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 30 Aug 2022 19:17:22 -0700 Subject: [PATCH] also could do something like this and only have one OVERRIDE ET --- selfdrive/controls/controlsd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index f90b5e8a83..2a9c276609 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -582,7 +582,8 @@ class Controls: # Check which actuators can be enabled CC.latActive = self.active and not CS.steerFaultTemporary and not CS.steerFaultPermanent and \ CS.vEgo > self.CP.minSteerSpeed and not CS.standstill - CC.longActive = self.active and not self.events.any(ET.OVERRIDE_LONG) and self.CP.openpilotLongitudinalControl + long_override = self.events.any(ET.OVERRIDE) and CS.gasPressed + CC.longActive = self.active and not long_override and self.CP.openpilotLongitudinalControl actuators = CC.actuators actuators.longControlState = self.LoC.long_control_state