controlsd: fix saturation warning (#31869)

fix saturation
This commit is contained in:
Justin Newberry
2024-03-14 21:03:39 -04:00
committed by GitHub
parent f6afb09924
commit 1ecbbef46b
+1 -2
View File
@@ -142,7 +142,6 @@ class Controls:
self.current_alert_types = [ET.PERMANENT]
self.logged_comm_issue = None
self.not_running_prev = None
self.last_actuators = car.CarControl.Actuators.new_message()
self.steer_limited = False
self.desired_curvature = 0.0
self.experimental_mode = False
@@ -621,7 +620,7 @@ class Controls:
undershooting = abs(lac_log.desiredLateralAccel) / abs(1e-3 + lac_log.actualLateralAccel) > 1.2
turning = abs(lac_log.desiredLateralAccel) > 1.0
good_speed = CS.vEgo > 5
max_torque = abs(self.last_actuators.steer) > 0.99
max_torque = abs(actuators.steer) > 0.99
if undershooting and turning and good_speed and max_torque:
lac_log.active and self.events.add(EventName.steerSaturated)
elif lac_log.saturated: