diff --git a/selfdrive/car/hyundai/carcontroller.py b/selfdrive/car/hyundai/carcontroller.py index b41ff020a0..0733ff0fc7 100644 --- a/selfdrive/car/hyundai/carcontroller.py +++ b/selfdrive/car/hyundai/carcontroller.py @@ -499,10 +499,10 @@ class CarController(CarControllerBase): a_error = accel - CS.out.aEgo jerk = jerk + (a_error * 2.0) - if self.hkg_custom_long_tuning: + if not self.hkg_custom_long_tuning: self.jerk_u = 3.0 if actuators.longControlState == LongCtrlState.pid else 1.0 self.jerk_l = 5.0 - if self.CP.carFingerprint in CANFD_CAR or self.CP.carFingerprint == CAR.HYUNDAI_KONA_EV_2022: + elif self.CP.carFingerprint in CANFD_CAR or self.CP.carFingerprint == CAR.HYUNDAI_KONA_EV_2022: startingJerk = 0.5 jerkLimit = 5.0 self.jerk_count += DT_CTRL