sign doesn't seem to matter

pull/24067/head
Shane Smiskol 4 years ago
parent 18a4c62e7f
commit 3d036b6169
  1. 3
      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 # 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 # 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 # 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
predicted_steering_fault = self.frames_above_rate_threshold > 18 # and (CS.out.steeringRateDeg * CS.out.steeringAngleDeg) < 0
# Cut steering while we're in a known fault state (2s) or about to be # 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: if not CC.latActive or CS.steer_state in (9, 25) or predicted_steering_fault:

Loading…
Cancel
Save