From cd46b333c5916e6562dfbfe791f9d8e15a8ac207 Mon Sep 17 00:00:00 2001 From: FrogAi <91348155+FrogAi@users.noreply.github.com> Date: Wed, 29 May 2024 04:00:23 -0700 Subject: [PATCH] FrogPilot community - Toyota steering hack Co-Authored-By: Jacob Pfeifer --- selfdrive/car/toyota/carcontroller.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/selfdrive/car/toyota/carcontroller.py b/selfdrive/car/toyota/carcontroller.py index d92539c..22583d9 100644 --- a/selfdrive/car/toyota/carcontroller.py +++ b/selfdrive/car/toyota/carcontroller.py @@ -76,6 +76,14 @@ class CarController(CarControllerBase): # EPS uses the torque sensor angle to control with, offset to compensate apply_angle = actuators.steeringAngleDeg + CS.out.steeringAngleOffsetDeg + # PFEIFER - TSH {{ + # Ignore limits while overriding, this prevents pull when releasing the wheel. This will cause messages to be + # blocked by panda safety, usually while the driver is overriding and limited to at most 1 message while the + # driver is not overriding. + if CS.out.steeringPressed: + self.last_angle = apply_angle + # }} PFEIFER - TSH + # Angular rate limit based on speed apply_angle = apply_std_steer_angle_limits(apply_angle, self.last_angle, CS.out.vEgoRaw, self.params)