This commit is contained in:
Your Name
2024-05-20 23:30:03 -05:00
parent 8dacb12362
commit dce9b86fb6

View File

@@ -88,13 +88,22 @@ def create_buttons(packer, CP, CAN, cnt, btn):
bus = CAN.ECAN if CP.flags & HyundaiFlags.CANFD_HDA2 else CAN.CAM
return packer.make_can_msg("CRUISE_BUTTONS", bus, values)
def create_buttons_alt(packer, CP, CAN, cnt, btn):
values = {
"COUNTER": cnt,
"SET_ME_1": 1,
"SET_ME_2": 2,
"CRUISE_BUTTONS": btn,
}
# def create_buttons_alt(packer, CP, CAN, cnt, btn):
# values = {
# "COUNTER": cnt,
# "SET_ME_1": 1,
# "SET_ME_2": 2,
# "CRUISE_BUTTONS": btn,
# }
# bus = CAN.ECAN # if CP.flags & HyundaiFlags.CANFD_HDA2 else CAN.CAM
# return packer.make_can_msg("CRUISE_BUTTONS_ALT", bus, values)
def create_buttons_alt(packer, CP, CAN, cnt, btn, template):
template.update({
"CRUISE_BUTTONS": btn
})
bus = CAN.ECAN # if CP.flags & HyundaiFlags.CANFD_HDA2 else CAN.CAM
return packer.make_can_msg("CRUISE_BUTTONS_ALT", bus, values)