wip
This commit is contained in:
@@ -200,9 +200,9 @@ class CarController(CarControllerBase):
|
||||
if CC.cruiseControl.cancel:
|
||||
if self.CP.flags & HyundaiFlags.CANFD_ALT_BUTTONS:
|
||||
# pass
|
||||
can_sends.append(hyundaicanfd.create_acc_cancel(self.packer, self.CP, self.CAN, CS.cruise_info))
|
||||
can_sends.append(hyundaicanfd.create_buttons_alt(self.packer, self.CP, self.CAN, CS.buttons_counter+1, Buttons.CANCEL))
|
||||
self.last_button_frame = self.frame
|
||||
# CS.lkas_trigger_result = 1
|
||||
CS.lkas_trigger_result = 1
|
||||
else:
|
||||
for _ in range(20):
|
||||
can_sends.append(hyundaicanfd.create_buttons(self.packer, self.CP, self.CAN, CS.buttons_counter+1, Buttons.CANCEL))
|
||||
|
||||
@@ -88,15 +88,16 @@ 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,
|
||||
# "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)
|
||||
bus = CAN.ECAN # if CP.flags & HyundaiFlags.CANFD_HDA2 else CAN.CAM
|
||||
return packer.make_can_msg("CRUISE_BUTTONS_ALT", bus, values)
|
||||
|
||||
def create_acc_cancel(packer, CP, CAN, cruise_info_copy):
|
||||
# why are we executing this at all?
|
||||
@@ -123,7 +124,7 @@ def create_acc_cancel(packer, CP, CAN, cruise_info_copy):
|
||||
"CRUISE_STANDSTILL",
|
||||
]}
|
||||
values.update({
|
||||
"ACCMode": 1, # testing 1 instead of 4
|
||||
"ACCMode": 4, # testing 1 instead of 4
|
||||
"aReqRaw": 0.0,
|
||||
"aReqValue": 0.0,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user