This commit is contained in:
Your Name
2024-05-21 00:29:31 -05:00
parent dd96b5aea7
commit b3467cf739
3 changed files with 44 additions and 9 deletions

View File

@@ -134,12 +134,16 @@ class CarController(CarControllerBase):
# params_memory = Params("/dev/shm/params")
params_memory = Params("/dev/shm/params")
if params_memory.get_bool("CPTLkasButtonAction"):
if self.frame % 2 == 0:
can_sends.append(hyundaicanfd.create_acc_control_alt(self.packer, self.CAN, CC.enabled, self.accel_last, accel, stopping, CC.cruiseControl.override,
set_speed_in_units, hud_control))
self.accel_last = accel
# 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, CS.cruise_can_msg))
print("Decel")
# print("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_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))
# print("Debug cancel executed")