This commit is contained in:
Your Name
2024-02-09 17:24:49 -06:00
parent 4948aecc6e
commit da6553c24d
4 changed files with 29 additions and 14 deletions

View File

@@ -197,9 +197,9 @@ class CarController:
# else:
# can_sends.extend([hyundaican.create_clu11(self.packer, (self.frame // 2) + 1, CS.clu11, self.cruise_button, self.CP.carFingerprint)] * 25)
# Test
if CS.cruise_buttons == Buttons.NONE and CS.cruiseState.enabled:
can_sends.append(hyundaicanfd.create_buttons(self.packer, self.CP, self.CAN, ((self.frame // 2) + 1) % 0x10, Buttons.SET_DECEL))
# Test - Works???
# if CS.cruise_buttons == Buttons.NONE and CS.cruiseState.enabled:
# can_sends.append(hyundaicanfd.create_buttons(self.packer, self.CP, self.CAN, ((self.frame // 2) + 1) % 0x10, Buttons.SET_DECEL))
new_actuators = actuators.copy()
new_actuators.steer = apply_steer / self.params.STEER_MAX
@@ -237,10 +237,13 @@ class CarController:
if CS.oscar_lane_center_btn_pressed:
CS.oscar_lane_center_btn_pressed = False
# CC.cruiseControl.resume = True
CC.cruiseControl.cancel = True
# CC.cruiseControl.cancel = True
# Test this...
# ?? can_sends.append(hyundaicanfd.create_acc_control(self.packer, self.CAN, CC.enabled, self.accel_last, accel, stopping, CC.cruiseControl.override,
# set_speed_in_units, CS.personality_profile))
# Also try create_acc_commands
# This attempts to set the speed to
stopping = CC.actuators.longControlState == LongCtrlState.stopping
can_sends.append(hyundaicanfd.create_acc_control(self.packer, self.CAN, CC.enabled, self.accel_last, CC.actuators.accel, stopping, CC.cruiseControl.override,
40, CS.personality_profile))
# cruise cancel
if CC.cruiseControl.cancel: