diff --git a/selfdrive/car/hyundai/carcontroller.py b/selfdrive/car/hyundai/carcontroller.py index a137daa..2eb25f5 100755 --- a/selfdrive/car/hyundai/carcontroller.py +++ b/selfdrive/car/hyundai/carcontroller.py @@ -131,10 +131,9 @@ class CarController(CarControllerBase): params_memory = Params("/dev/shm/params") if params_memory.get_bool("CPTLkasButtonAction"): - params_memory.put_bool("CPTLkasButtonAction", False) # can_sends.extend(hyundaicanfd.create_adrv_messages(self.packer, self.CAN, self.frame)) can_sends.append(hyundaicanfd.create_acc_control(self.packer, self.CAN, CC.enabled, self.accel_last, accel, stopping, CC.cruiseControl.override, - 40, hud_control)) + 50, hud_control)) print("Debug cancel executed") if self.CP.openpilotLongitudinalControl: @@ -196,7 +195,7 @@ class CarController(CarControllerBase): can_sends = [] if use_clu11: if CC.cruiseControl.cancel: - print("Yes") + print("Cancel button go") can_sends.append(hyundaican.create_clu11(self.packer, self.frame, CS.clu11, Buttons.CANCEL, self.CP)) CS.lkas_trigger_result = 5 elif CC.cruiseControl.resume: diff --git a/selfdrive/car/hyundai/hyundaicanfd.py b/selfdrive/car/hyundai/hyundaicanfd.py index e5b64e5..c102d69 100755 --- a/selfdrive/car/hyundai/hyundaicanfd.py +++ b/selfdrive/car/hyundai/hyundaicanfd.py @@ -134,7 +134,7 @@ def create_acc_cancel(packer, CP, CAN, cruise_info_copy): # This doesn't appear to do anything on my tucson def create_lfahda_cluster(packer, CAN, enabled, lat_active): values = { - "HDA_ICON": 0, + "HDA_ICON": 1, "LFA_ICON": 2 if enabled else 1 if lat_active else 0 } diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 53bfa79..82797c9 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -1237,8 +1237,11 @@ class Controls: def clearpilot_state_control(self, CC, CS): if any(be.pressed and be.type == FrogPilotButtonType.lkas for be in CS.buttonEvents): - # CC.cruiseControl.resume = True - self.params_memory.put_bool("CPTLkasButtonAction", True) +# self.params_memory.put_bool("CPTLkasButtonAction", True) + if self.params_memory.get_bool("CPTLkasButtonAction", False): + self.params_memory.put_bool("CPTLkasButtonAction", True) + else: + self.params_memory.put_bool("CPTLkasButtonAction", False) self.params_memory.put_int("SpeedLimitLatDesired", CC.actuators.speed * CV.MS_TO_MPH ) # CC.actuators.speed # print ("Alive")