From 3d036b616958fad588866e34d1eacbfc8c2c4efb Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 29 Mar 2022 13:20:56 -0700 Subject: [PATCH] sign doesn't seem to matter --- selfdrive/car/toyota/carcontroller.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/selfdrive/car/toyota/carcontroller.py b/selfdrive/car/toyota/carcontroller.py index 99dcf1d3b3..ec0d24d19d 100644 --- a/selfdrive/car/toyota/carcontroller.py +++ b/selfdrive/car/toyota/carcontroller.py @@ -67,8 +67,7 @@ class CarController: # EPS_STATUS->LKA_STATE either goes to 21 or 25 on rising edge of a steering fault and # the value seems to describe how many frames the steering rate was above 100 deg/s, so # cut torque with some margin for the lower state - # Only cut torque when steering angle and rate have opposite signs - predicted_steering_fault = self.frames_above_rate_threshold > 18 # and (CS.out.steeringRateDeg * CS.out.steeringAngleDeg) < 0 + predicted_steering_fault = self.frames_above_rate_threshold > 18 # Cut steering while we're in a known fault state (2s) or about to be if not CC.latActive or CS.steer_state in (9, 25) or predicted_steering_fault: