diff --git a/panda b/panda index b44df8151a..94cd9a0788 160000 --- a/panda +++ b/panda @@ -1 +1 @@ -Subproject commit b44df8151a15fa3afe8a8943e332eb63605a2245 +Subproject commit 94cd9a0788070e4e802e8a6a1c1cc7dae95e8f70 diff --git a/selfdrive/car/ford/carcontroller.py b/selfdrive/car/ford/carcontroller.py index 6c12a0e6bc..d205960605 100644 --- a/selfdrive/car/ford/carcontroller.py +++ b/selfdrive/car/ford/carcontroller.py @@ -10,14 +10,14 @@ VisualAlert = car.CarControl.HUDControl.VisualAlert def apply_ford_curvature_limits(apply_curvature, apply_curvature_last, current_curvature, v_ego_raw): - # Note that we do curvature error limiting after the rate limits since they are just for tuning reasons - apply_curvature = apply_std_steer_angle_limits(apply_curvature, apply_curvature_last, v_ego_raw, CarControllerParams) - # No blending at low speed due to lack of torque wind-up and inaccurate current curvature if v_ego_raw > 9: apply_curvature = clip(apply_curvature, current_curvature - CarControllerParams.CURVATURE_ERROR, current_curvature + CarControllerParams.CURVATURE_ERROR) + # Curvature rate limit after driver torque limit + apply_curvature = apply_std_steer_angle_limits(apply_curvature, apply_curvature_last, v_ego_raw, CarControllerParams) + return clip(apply_curvature, -CarControllerParams.CURVATURE_MAX, CarControllerParams.CURVATURE_MAX)