mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-23 15:02:06 +08:00
HKG: resume from standstill for HDA1 CAN-FD (#26069)
* Cruise Button Press on bus 6 for HDA1 Canfd * use bus helper * Update hyundaicanfd.py * Update hyundaicanfd.py * Update hyundaicanfd.py * Update hyundaicanfd.py * Update selfdrive/car/hyundai/hyundaicanfd.py Co-authored-by: Shane Smiskol <shane@smiskol.com> * Update selfdrive/car/hyundai/hyundaicanfd.py Co-authored-by: Shane Smiskol <shane@smiskol.com> * bump panda Co-authored-by: Shane Smiskol <shane@smiskol.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
This commit is contained in:
+1
-1
Submodule panda updated: b95a65df58...dd751862c3
@@ -135,14 +135,17 @@ class CarController:
|
||||
self.last_button_frame = self.frame
|
||||
else:
|
||||
for _ in range(20):
|
||||
can_sends.append(hyundaicanfd.create_buttons(self.packer, CS.buttons_counter+1, Buttons.CANCEL))
|
||||
can_sends.append(hyundaicanfd.create_buttons(self.packer, self.CP, CS.buttons_counter+1, Buttons.CANCEL))
|
||||
self.last_button_frame = self.frame
|
||||
|
||||
# cruise standstill resume
|
||||
elif CC.cruiseControl.resume:
|
||||
if not (self.CP.flags & HyundaiFlags.CANFD_ALT_BUTTONS):
|
||||
if self.CP.flags & HyundaiFlags.CANFD_ALT_BUTTONS:
|
||||
# TODO: resume for alt button cars
|
||||
pass
|
||||
else:
|
||||
for _ in range(20):
|
||||
can_sends.append(hyundaicanfd.create_buttons(self.packer, CS.buttons_counter+1, Buttons.RES_ACCEL))
|
||||
can_sends.append(hyundaicanfd.create_buttons(self.packer, self.CP, CS.buttons_counter+1, Buttons.RES_ACCEL))
|
||||
self.last_button_frame = self.frame
|
||||
else:
|
||||
can_sends.append(hyundaican.create_lkas11(self.packer, self.frame, self.car_fingerprint, apply_steer, lat_active,
|
||||
|
||||
@@ -3,7 +3,7 @@ from selfdrive.car.hyundai.values import HyundaiFlags
|
||||
|
||||
def get_e_can_bus(CP):
|
||||
# On the CAN-FD platforms, the LKAS camera is on both A-CAN and E-CAN. HDA2 cars
|
||||
# have a a different harness than the HDA1 and non-HDA variants in order to split
|
||||
# have a different harness than the HDA1 and non-HDA variants in order to split
|
||||
# a different bus, since the steering is done by different ECUs.
|
||||
return 5 if CP.flags & HyundaiFlags.CANFD_HDA2 else 4
|
||||
|
||||
@@ -39,13 +39,15 @@ def create_cam_0x2a4(packer, camera_values):
|
||||
})
|
||||
return packer.make_can_msg("CAM_0x2a4", 4, camera_values)
|
||||
|
||||
def create_buttons(packer, cnt, btn):
|
||||
def create_buttons(packer, CP, cnt, btn):
|
||||
values = {
|
||||
"COUNTER": cnt,
|
||||
"SET_ME_1": 1,
|
||||
"CRUISE_BUTTONS": btn,
|
||||
}
|
||||
return packer.make_can_msg("CRUISE_BUTTONS", 5, values)
|
||||
|
||||
bus = 5 if CP.flags & HyundaiFlags.CANFD_HDA2 else 6
|
||||
return packer.make_can_msg("CRUISE_BUTTONS", bus, values)
|
||||
|
||||
def create_acc_cancel(packer, CP, cruise_info_copy):
|
||||
values = cruise_info_copy
|
||||
|
||||
Reference in New Issue
Block a user