also could do something like this and only have one OVERRIDE ET

pull/25617/head
Shane Smiskol 3 years ago
parent 7e4e7b5d2c
commit 5c381641c0
  1. 3
      selfdrive/controls/controlsd.py

@ -582,7 +582,8 @@ class Controls:
# Check which actuators can be enabled # Check which actuators can be enabled
CC.latActive = self.active and not CS.steerFaultTemporary and not CS.steerFaultPermanent and \ CC.latActive = self.active and not CS.steerFaultTemporary and not CS.steerFaultPermanent and \
CS.vEgo > self.CP.minSteerSpeed and not CS.standstill 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 = CC.actuators
actuators.longControlState = self.LoC.long_control_state actuators.longControlState = self.LoC.long_control_state

Loading…
Cancel
Save