From 58004f4fc65f6999f201a4d2c501e4c23bee072f Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Mon, 22 Jul 2024 21:50:31 -0400 Subject: [PATCH] fix pulsing --- selfdrive/car/hyundai/carcontroller.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/selfdrive/car/hyundai/carcontroller.py b/selfdrive/car/hyundai/carcontroller.py index c51e385d2c..53aa9b6111 100644 --- a/selfdrive/car/hyundai/carcontroller.py +++ b/selfdrive/car/hyundai/carcontroller.py @@ -284,8 +284,8 @@ class CarController(CarControllerBase): self.last_button_frame = self.frame elif self.frame % 2 == 0: can_sends.extend([hyundaican.create_clu11(self.packer, (self.frame // 2) + 1, CS.clu11, self.cruise_button, self.CP)] * 25) - #else: - # self.make_jerk(CS, accel, actuators) + else: + self.make_jerk(CS, accel, actuators) # Parse lead distance from radarState and display the corresponding distance in the car's cluster if self.CP.openpilotLongitudinalControl and self.sm.updated['radarState'] and self.frame % 5 == 0: @@ -298,7 +298,6 @@ class CarController(CarControllerBase): # TODO: unclear if this is needed jerk = 3.0 if actuators.longControlState == LongCtrlState.pid else 1.0 use_fca = self.CP.flags & HyundaiFlags.USE_FCA.value - self.make_jerk(CS, accel, actuators) self.make_accel(accel, actuators) can_sends.extend(hyundaican.create_acc_commands(self.packer, CC.enabled and CS.out.cruiseState.enabled, accel, self.accel_val, self.jerk_l, self.jerk_u, int(self.frame / 2), hud_control, set_speed_in_units, stopping,