wip
This commit is contained in:
@@ -135,6 +135,8 @@ class CarController:
|
|||||||
if hda2 and self.CP.flags & HyundaiFlags.ENABLE_BLINKERS:
|
if hda2 and self.CP.flags & HyundaiFlags.ENABLE_BLINKERS:
|
||||||
can_sends.extend(hyundaicanfd.create_spas_messages(self.packer, self.CAN, self.frame, CC.leftBlinker, CC.rightBlinker))
|
can_sends.extend(hyundaicanfd.create_spas_messages(self.packer, self.CAN, self.frame, CC.leftBlinker, CC.rightBlinker))
|
||||||
|
|
||||||
|
# can_sends.append(hyundaicanfd.create_misc_messages(self.packer, self.CAN, self.frame))
|
||||||
|
|
||||||
if self.CP.openpilotLongitudinalControl:
|
if self.CP.openpilotLongitudinalControl:
|
||||||
if hda2:
|
if hda2:
|
||||||
can_sends.extend(hyundaicanfd.create_adrv_messages(self.packer, self.CAN, self.frame))
|
can_sends.extend(hyundaicanfd.create_adrv_messages(self.packer, self.CAN, self.frame))
|
||||||
@@ -210,7 +212,6 @@ class CarController:
|
|||||||
def create_button_messages(self, CC: car.CarControl, CS: car.CarState, use_clu11: bool):
|
def create_button_messages(self, CC: car.CarControl, CS: car.CarState, use_clu11: bool):
|
||||||
can_sends = []
|
can_sends = []
|
||||||
|
|
||||||
|
|
||||||
# Test me.
|
# 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:
|
# if self.CP.openpilotLongitudinalControl:
|
||||||
@@ -234,9 +235,12 @@ class CarController:
|
|||||||
if (self.frame - self.last_button_frame) * DT_CTRL > 0.25:
|
if (self.frame - self.last_button_frame) * DT_CTRL > 0.25:
|
||||||
|
|
||||||
if CS.oscar_lane_center_btn_pressed:
|
if CS.oscar_lane_center_btn_pressed:
|
||||||
CS.oscar_lane_center_btn_pressed= False
|
CS.oscar_lane_center_btn_pressed = False
|
||||||
# CC.cruiseControl.resume = True
|
# 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))
|
||||||
|
|
||||||
# cruise cancel
|
# cruise cancel
|
||||||
if CC.cruiseControl.cancel:
|
if CC.cruiseControl.cancel:
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ def create_acc_control(packer, CAN, enabled, accel_last, accel, stopping, gas_ov
|
|||||||
|
|
||||||
return packer.make_can_msg("SCC_CONTROL", CAN.ECAN, values)
|
return packer.make_can_msg("SCC_CONTROL", CAN.ECAN, values)
|
||||||
|
|
||||||
|
|
||||||
def create_spas_messages(packer, CAN, frame, left_blink, right_blink):
|
def create_spas_messages(packer, CAN, frame, left_blink, right_blink):
|
||||||
ret = []
|
ret = []
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user