This commit is contained in:
Your Name
2024-05-18 03:59:54 -05:00
parent 3da2069795
commit 103a1624d9

View File

@@ -131,12 +131,12 @@ class CarController(CarControllerBase):
if hda2 and self.CP.flags & HyundaiFlags.ENABLE_BLINKERS: if hda2 and self.CP.flags & HyundaiFlags.ENABLE_BLINKERS:
can_sends.extend(hyundaicanfd.create_spas_messages(self.packer, self.CAN, self.frame, CC.leftBlinker, CC.rightBlinker)) can_sends.extend(hyundaicanfd.create_spas_messages(self.packer, self.CAN, self.frame, CC.leftBlinker, CC.rightBlinker))
params_memory = Params("/dev/shm/params") # params_memory = Params("/dev/shm/params")
if params_memory.get_bool("CPTLkasButtonAction"): # if params_memory.get_bool("CPTLkasButtonAction"):
# can_sends.extend(hyundaicanfd.create_adrv_messages(self.packer, self.CAN, self.frame)) # can_sends.extend(hyundaicanfd.create_adrv_messages(self.packer, self.CAN, self.frame))
can_sends.append(hyundaicanfd.create_acc_set_speed(self.packer, self.CP, self.CAN, CS.cruise_info, 50)) # can_sends.append(hyundaicanfd.create_acc_set_speed(self.packer, self.CP, self.CAN, CS.cruise_info, 50))
# can_sends.append(hyundaicanfd.create_acc_cancel(self.packer, self.CP, self.CAN, CS.cruise_info)) # can_sends.append(hyundaicanfd.create_acc_cancel(self.packer, self.CP, self.CAN, CS.cruise_info))
print("Debug cancel executed") # print("Debug cancel executed")
if self.CP.openpilotLongitudinalControl: if self.CP.openpilotLongitudinalControl:
if hda2: if hda2:
@@ -209,11 +209,11 @@ class CarController(CarControllerBase):
self.last_button_frame = self.frame self.last_button_frame = self.frame
else: else:
if (self.frame - self.last_button_frame) * DT_CTRL > 0.25: if (self.frame - self.last_button_frame) * DT_CTRL > 0.25:
# params_memory = Params("/dev/shm/params") params_memory = Params("/dev/shm/params")
# if params_memory.get_bool("CPTLkasButtonAction"): if params_memory.get_bool("CPTLkasButtonAction"):
# params_memory.put_bool("CPTLkasButtonAction", False) params_memory.put_bool("CPTLkasButtonAction", False)
# CC.cruiseControl.cancel = True CC.cruiseControl.cancel = True
# print("Debug cancel executed") print("Debug cancel executed")
# cruise cancel # cruise cancel
if CC.cruiseControl.cancel: if CC.cruiseControl.cancel:
if self.CP.flags & HyundaiFlags.CANFD_ALT_BUTTONS: if self.CP.flags & HyundaiFlags.CANFD_ALT_BUTTONS: