From 23bc2b80d871a40692b518f9000e11212e9342a5 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Fri, 3 Oct 2025 22:05:10 -0500 Subject: [PATCH] Revert "Update latcontrol_torque.py" This reverts commit 13c3070fa170b4fd005ed6424803141bd4f71cdf. --- selfdrive/controls/lib/latcontrol.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/selfdrive/controls/lib/latcontrol.py b/selfdrive/controls/lib/latcontrol.py index cca420a25..93f59f276 100644 --- a/selfdrive/controls/lib/latcontrol.py +++ b/selfdrive/controls/lib/latcontrol.py @@ -24,12 +24,8 @@ class LatControl(ABC): self.sat_count = 0. def _check_saturation(self, saturated, CS, steer_limited_by_safety, curvature_limited): - # Treat either controller saturation, curvature limiting, or the safety layer - # clamping the request as a saturation event. The additional safety check - # catches cases where the torque request is being clipped - saturated = saturated or curvature_limited or steer_limited_by_safety - - if saturated and CS.vEgo > self.sat_check_min_speed and not CS.steeringPressed: + # Saturated only if control output is not being limited by car torque/angle rate limits + if (saturated or curvature_limited) and CS.vEgo > self.sat_check_min_speed and not steer_limited_by_safety and not CS.steeringPressed: self.sat_count += self.sat_count_rate else: self.sat_count -= self.sat_count_rate