diff --git a/selfdrive/car/hyundai/carcontroller.py b/selfdrive/car/hyundai/carcontroller.py index b7d102b9e8..8740b22164 100644 --- a/selfdrive/car/hyundai/carcontroller.py +++ b/selfdrive/car/hyundai/carcontroller.py @@ -56,8 +56,8 @@ class CarController: self.car_fingerprint = CP.carFingerprint self.last_button_frame = 0 - def create_button_messages(self, CC, CS, can_sends, can=False, can_fd=False): - if can: + def create_button_messages(self, CC, CS, can_sends, can_platform): + if can_platform: if CC.cruiseControl.cancel: can_sends.append(hyundaican.create_clu11(self.packer, self.frame, CS.clu11, Buttons.CANCEL, self.CP.carFingerprint)) elif CC.cruiseControl.resume: @@ -67,7 +67,7 @@ class CarController: can_sends.extend([hyundaican.create_clu11(self.packer, self.frame, CS.clu11, Buttons.RES_ACCEL, self.CP.carFingerprint)] * 25) if (self.frame - self.last_button_frame) * DT_CTRL >= 0.15: self.last_button_frame = self.frame - elif can_fd: + else: if (self.frame - self.last_button_frame) * DT_CTRL > 0.25: # cruise cancel if CC.cruiseControl.cancel: