From be628a964e02f1123223d0c24030a2f10b5750d4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 9 Feb 2024 10:13:44 -0600 Subject: [PATCH] wip --- selfdrive/car/hyundai/carcontroller.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/selfdrive/car/hyundai/carcontroller.py b/selfdrive/car/hyundai/carcontroller.py index a19a3bd..93f39cc 100644 --- a/selfdrive/car/hyundai/carcontroller.py +++ b/selfdrive/car/hyundai/carcontroller.py @@ -210,10 +210,7 @@ class CarController: def create_button_messages(self, CC: car.CarControl, CS: car.CarState, use_clu11: bool): can_sends = [] - if CS.oscar_lane_center_btn_pressed: - CS.oscar_lane_center_btn_pressed= False - CC.cruiseControl.resume = True - floog = floorp + # Test me. # can_sends.append(hyundaicanfd.create_buttons(self.packer, self.CP, self.CAN, 1, Buttons.RES_ACCEL)) # if self.CP.openpilotLongitudinalControl: @@ -235,6 +232,12 @@ class CarController: self.last_button_frame = self.frame else: if (self.frame - self.last_button_frame) * DT_CTRL > 0.25: + + if CS.oscar_lane_center_btn_pressed: + CS.oscar_lane_center_btn_pressed= False + # CC.cruiseControl.resume = True + CC.cruiseControl.cancel = True + # cruise cancel if CC.cruiseControl.cancel: if self.CP.flags & HyundaiFlags.CANFD_ALT_BUTTONS: