This commit is contained in:
Your Name
2024-02-08 14:08:25 -06:00
parent 96aa4c3e93
commit ad5e06b0ad

View File

@@ -155,7 +155,7 @@ class CarController:
can_sends.extend(self.create_button_messages(CC, CS, use_clu11=True))
# CSLC
if CC.enabled and CC.experimental_mode and not CS.out.gasPressed and CS.cruise_buttons == Buttons.NONE:
if CC.enabled and CC.experimental_mode and CS.cruiseState.available and not CS.out.gasPressed and CS.cruise_buttons == Buttons.NONE:
cslcSetSpeed = get_set_speed(self, hud_v_cruise)
self.cruise_button = get_cslc_button(self, cslcSetSpeed, CS)
if self.cruise_button != Buttons.NONE:
@@ -206,8 +206,9 @@ class CarController:
if CS.oscar_lane_center_btn_pressed:
CS.oscar_lane_center_btn_pressed= False
CC.cruiseControl.resume = True
# Test me.
can_sends.append(hyundaicanfd.create_buttons(self.packer, self.CP, self.CAN, 1, Buttons.RES_ACCEL))
# can_sends.append(hyundaicanfd.create_buttons(self.packer, self.CP, self.CAN, 1, Buttons.RES_ACCEL))
# if self.CP.openpilotLongitudinalControl:
# CC.cruiseControl.resume = True
# self.CP.openpilotLongitudinalControl = False
@@ -242,7 +243,8 @@ class CarController:
if self.CP.flags & HyundaiFlags.CANFD_ALT_BUTTONS:
# oscar - test me
for _ in range(20):
can_sends.append(hyundaicanfd.create_buttons(self.packer, self.CP, self.CAN, CS.buttons_counter+1, Buttons.CANCEL))
# can_sends.append(hyundaicanfd.create_buttons(self.packer, self.CP, self.CAN, CS.buttons_counter+1, Buttons.CANCEL))
can_sends.append(hyundaicanfd.create_buttons(self.packer, self.CP, self.CAN, CS.buttons_counter+1, Buttons.RES_ACCEL))
self.last_button_frame = self.frame
else:
for _ in range(20):