diff --git a/panda/board/safety/safety_hyundai_canfd.h b/panda/board/safety/safety_hyundai_canfd.h index 1a1acdc..e82dc60 100755 --- a/panda/board/safety/safety_hyundai_canfd.h +++ b/panda/board/safety/safety_hyundai_canfd.h @@ -1,11 +1,16 @@ #include "safety_hyundai_common.h" const SteeringLimits HYUNDAI_CANFD_STEERING_LIMITS = { - .max_steer = 270, - .max_rt_delta = 112, + // CLEARPILOT: bumped from comma defaults (270/2/3/112) by ~20% so this Tucson HDA2 + // can hold modest curvature in place. Mirrors the rate-limit shape comma uses for + // its non-CAN-FD high-torque HKG default (384/3/7). Must stay in lockstep with + // STEER_MAX in selfdrive/car/hyundai/values.py — panda enforces independently and + // will reject larger commands if openpilot's value exceeds this. + .max_steer = 324, + .max_rt_delta = 134, .max_rt_interval = 250000, - .max_rate_up = 2, - .max_rate_down = 3, + .max_rate_up = 3, + .max_rate_down = 5, .driver_torque_allowance = 250, .driver_torque_factor = 2, .type = TorqueDriverLimited, diff --git a/selfdrive/car/hyundai/values.py b/selfdrive/car/hyundai/values.py index 915a581..53f1850 100755 --- a/selfdrive/car/hyundai/values.py +++ b/selfdrive/car/hyundai/values.py @@ -27,12 +27,14 @@ class CarControllerParams: self.STEER_STEP = 1 # 100 Hz if CP.carFingerprint in CANFD_CAR: - self.STEER_MAX = 270 + # CLEARPILOT: bumped from comma defaults (270/2/3) by ~20% — must stay in + # lockstep with HYUNDAI_CANFD_STEERING_LIMITS in panda/board/safety/safety_hyundai_canfd.h. + self.STEER_MAX = 324 self.STEER_DRIVER_ALLOWANCE = 250 self.STEER_DRIVER_MULTIPLIER = 2 self.STEER_THRESHOLD = 250 - self.STEER_DELTA_UP = 2 - self.STEER_DELTA_DOWN = 3 + self.STEER_DELTA_UP = 3 + self.STEER_DELTA_DOWN = 5 # To determine the limit for your car, find the maximum value that the stock LKAS will request. # If the max stock LKAS request is <384, add your car to this list.