From dbbd2872ed0a50d4c9665779c61221913dbadb2c Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 23 Mar 2022 11:19:49 -0700 Subject: [PATCH] this matters --- selfdrive/car/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/__init__.py b/selfdrive/car/__init__.py index d3abb2e2e..9e64067c1 100644 --- a/selfdrive/car/__init__.py +++ b/selfdrive/car/__init__.py @@ -68,10 +68,10 @@ def apply_std_steer_torque_limits(apply_torque, apply_torque_last, driver_torque def apply_toyota_steer_torque_limits(apply_torque, apply_torque_last, driver_torque, LIMITS): # limits due to driver torque driver_torque = 0 if abs(driver_torque) <= 10 else driver_torque - driver_torque_max = driver_torque + (interp(abs(driver_torque), [100, 300], [LIMITS.STEER_MAX, LIMITS.STEER_MAX / 5])) driver_torque_min = driver_torque - interp(abs(driver_torque), [100, 300], [LIMITS.STEER_MAX, LIMITS.STEER_MAX / 5]) + driver_torque_max = driver_torque + (interp(abs(driver_torque), [100, 300], [LIMITS.STEER_MAX, LIMITS.STEER_MAX / 5])) - apply_torque = clip(apply_torque, driver_torque_max, driver_torque_min) + apply_torque = clip(apply_torque, driver_torque_min, driver_torque_max) apply_torque = clip(apply_torque, -LIMITS.STEER_MAX, LIMITS.STEER_MAX) # slow rate if steer torque increases in magnitude