MADS: don't allow actuation if not calibrated (#37)

This commit is contained in:
Jason Wen
2023-02-18 18:46:12 -05:00
committed by GitHub
parent c20c3c5ecc
commit 8892950697
+1 -1
View File
@@ -617,7 +617,7 @@ class Controls:
CC.latActive = (self.active or self.mads_ndlob) and not CS.steerFaultTemporary and not CS.steerFaultPermanent and \
(not standstill or self.joystick_mode) and CS.madsEnabled and (not CS.brakePressed or self.mads_ndlob) and \
(not CS.belowLaneChangeSpeed or (not (((self.sm.frame - self.last_blinker_frame) * DT_CTRL) < 1.0) and
not (CS.leftBlinker or CS.rightBlinker))) and CS.latActive
not (CS.leftBlinker or CS.rightBlinker))) and CS.latActive and self.sm['liveCalibration'].calStatus == Calibration.CALIBRATED
CC.longActive = self.enabled_long and not (CS.brakePressed and (not self.CS_prev.brakePressed or not CS.standstill)) and not self.events.any(ET.OVERRIDE_LONGITUDINAL)
actuators = CC.actuators