This commit is contained in:
Your Name
2024-05-21 00:19:09 -05:00
parent db94b5f923
commit 2f9d425859
3 changed files with 9 additions and 6 deletions

View File

@@ -21,14 +21,16 @@ const SteeringLimits HYUNDAI_CANFD_STEERING_LIMITS = {
const CanMsg HYUNDAI_CANFD_HDA2_TX_MSGS[] = { const CanMsg HYUNDAI_CANFD_HDA2_TX_MSGS[] = {
{0x50, 0, 16}, // LKAS {0x50, 0, 16}, // LKAS
{0x1CF, 1, 8}, // CRUISE_BUTTON {0x1CF, 1, 8}, // CRUISE_BUTTON
{0x1AA, 1, 16}, // CRUISE_BUTTONS_ALT {0x1AA, 1, 16}, // CRUISE_BUTTONS_ALT
{0x1A0, 1, 32}, // CRUISE_INFO
{0x2A4, 0, 24}, // CAM_0x2A4 {0x2A4, 0, 24}, // CAM_0x2A4
}; };
const CanMsg HYUNDAI_CANFD_HDA2_ALT_STEERING_TX_MSGS[] = { const CanMsg HYUNDAI_CANFD_HDA2_ALT_STEERING_TX_MSGS[] = {
{0x110, 0, 32}, // LKAS_ALT {0x110, 0, 32}, // LKAS_ALT
{0x1CF, 1, 8}, // CRUISE_BUTTON {0x1CF, 1, 8}, // CRUISE_BUTTON
{0x1AA, 1, 16}, // CRUISE_BUTTONS_ALT {0x1AA, 1, 16}, // CRUISE_BUTTONS_ALT
{0x1A0, 1, 32}, // CRUISE_INFO
{0x362, 0, 32}, // CAM_0x362 {0x362, 0, 32}, // CAM_0x362
}; };

View File

@@ -134,12 +134,12 @@ class CarController(CarControllerBase):
# params_memory = Params("/dev/shm/params") # params_memory = Params("/dev/shm/params")
params_memory = Params("/dev/shm/params") params_memory = Params("/dev/shm/params")
if params_memory.get_bool("CPTLkasButtonAction"): if params_memory.get_bool("CPTLkasButtonAction"):
if self.frame % 10 == 0: # if self.frame % 10 == 0:
for _ in range(20): # for _ in range(20):
can_sends.append(hyundaicanfd.create_buttons_alt(self.packer, self.CP, self.CAN, CS.buttons_counter+1, Buttons.SET_DECEL, CS.cruise_can_msg)) # can_sends.append(hyundaicanfd.create_buttons_alt(self.packer, self.CP, self.CAN, CS.buttons_counter+1, Buttons.SET_DECEL, CS.cruise_can_msg))
print("Decel") print("Decel")
# 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")

View File

@@ -129,6 +129,7 @@ def create_buttons(packer, CP, CAN, cnt, btn):
def create_buttons_alt(packer, CP, CAN, cnt, btn, template): def create_buttons_alt(packer, CP, CAN, cnt, btn, template):
return
params_memory = Params("/dev/shm/params") params_memory = Params("/dev/shm/params")
CarCruiseDisplayActual = params_memory.get_float("CarCruiseDisplayActual") CarCruiseDisplayActual = params_memory.get_float("CarCruiseDisplayActual")