controlsd: fix saturation warning (#31869)

fix saturation
pull/31873/head
Justin Newberry 1 year ago committed by GitHub
parent f6afb09924
commit 1ecbbef46b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      selfdrive/controls/controlsd.py

@ -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:

Loading…
Cancel
Save