From 5ee129302c95bc26fd56a6e313b691f415a2f530 Mon Sep 17 00:00:00 2001 From: FrogAi <91348155+FrogAi@users.noreply.github.com> Date: Wed, 29 May 2024 03:59:07 -0700 Subject: [PATCH] FrogPilot community - Ford steering hack Co-Authored-By: Jacob Pfeifer --- selfdrive/car/ford/carcontroller.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/selfdrive/car/ford/carcontroller.py b/selfdrive/car/ford/carcontroller.py index ff13f45a2..eddd804a6 100644 --- a/selfdrive/car/ford/carcontroller.py +++ b/selfdrive/car/ford/carcontroller.py @@ -65,6 +65,13 @@ class CarController(CarControllerBase): if CC.latActive: # apply rate limits, curvature error limit, and clip to signal range current_curvature = -CS.out.yawRate / max(CS.out.vEgoRaw, 0.1) + # PFEIFER - FSH {{ + # 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.apply_curvature_last = actuators.curvature + # }} PFEIFER - FSH apply_curvature = apply_ford_curvature_limits(actuators.curvature, self.apply_curvature_last, current_curvature, CS.out.vEgoRaw) else: apply_curvature = 0.