wip
This commit is contained in:
@@ -132,7 +132,10 @@ class CarController(CarControllerBase):
|
||||
can_sends.extend(hyundaicanfd.create_spas_messages(self.packer, self.CAN, self.frame, CC.leftBlinker, CC.rightBlinker))
|
||||
|
||||
# params_memory = Params("/dev/shm/params")
|
||||
# if params_memory.get_bool("CPTLkasButtonAction"):
|
||||
if params_memory.get_bool("CPTLkasButtonAction"):
|
||||
if self.frame % 10 == 0:
|
||||
for _ in range(20):
|
||||
can_sends.append(hyundaicanfd.create_buttons_alt(self.packer, self.CP, self.CAN, CS.buttons_counter+1, Buttons.SET_DECEL))
|
||||
# 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_cancel(self.packer, self.CP, self.CAN, CS.cruise_info))
|
||||
@@ -197,7 +200,6 @@ class CarController(CarControllerBase):
|
||||
can_sends = []
|
||||
if use_clu11:
|
||||
if CC.cruiseControl.cancel:
|
||||
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:
|
||||
@@ -210,17 +212,18 @@ class CarController(CarControllerBase):
|
||||
else:
|
||||
if (self.frame - self.last_button_frame) * DT_CTRL > 0.25:
|
||||
params_memory = Params("/dev/shm/params")
|
||||
if params_memory.get_bool("CPTLkasButtonAction"):
|
||||
params_memory.put_bool("CPTLkasButtonAction", False)
|
||||
CC.cruiseControl.cancel = True
|
||||
print("Debug cancel executed")
|
||||
# if params_memory.get_bool("CPTLkasButtonAction"):
|
||||
# params_memory.put_bool("CPTLkasButtonAction", False)
|
||||
# CC.cruiseControl.cancel = True
|
||||
# print("Debug cancel executed")
|
||||
# cruise cancel
|
||||
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))
|
||||
print("Yes2")
|
||||
# can_sends.append(hyundaicanfd.create_acc_cancel(self.packer, self.CP, self.CAN, CS.cruise_info))
|
||||
for _ in range(20):
|
||||
can_sends.append(hyundaicanfd.create_buttons_alt(self.packer, self.CP, self.CAN, CS.buttons_counter+1, Buttons.CANCEL))
|
||||
print("Try Cancel Button Alt")
|
||||
self.last_button_frame = self.frame
|
||||
CS.lkas_trigger_result = 1
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user