Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2a6d2d7

Browse files
committedDec 17, 2024·
no hda2
1 parent 95719e2 commit 2a6d2d7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎opendbc/car/hyundai/carcontroller.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def update(self, CC, CS, now_nanos):
116116

117117
# LFA and HDA icons
118118
if self.frame % 5 == 0 and (not hda2 or hda2_long):
119-
if self.CP.flags & HyundaiFlags.CCNC:
119+
if self.CP.flags & HyundaiFlags.CCNC and not hda2:
120120
can_sends.extend(hyundaicanfd.create_ccnc(self.packer, self.CAN, self.frame, self.CP, CC, CS))
121121
else:
122122
can_sends.append(hyundaicanfd.create_lfahda_cluster(self.packer, self.CAN, CC.enabled))

‎opendbc/car/hyundai/carstate.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ def update_canfd(self, can_parsers) -> structs.CarState:
227227
ret.steeringPressed = self.update_steering_pressed(abs(ret.steeringTorque) > self.params.STEER_THRESHOLD, 5)
228228
ret.steerFaultTemporary = cp.vl["MDPS"]["LKA_FAULT"] != 0
229229

230-
if self.CP.flags & HyundaiFlags.CCNC:
230+
if self.CP.flags & HyundaiFlags.CCNC and not self.CP.flags & HyundaiFlags.CANFD_HDA2:
231231
self.msg_161 = copy.copy(cp_cam.vl["MSG_161"])
232232
self.msg_162 = copy.copy(cp_cam.vl["MSG_162"])
233233

234-
alt = "_ALT" if self.CP.flags & HyundaiFlags.CCNC else ""
234+
alt = "_ALT" if self.CP.flags & HyundaiFlags.CCNC and not self.CP.flags & HyundaiFlags.CANFD_HDA2 else ""
235235
ret.leftBlinker, ret.rightBlinker = self.update_blinker_from_lamp(50, cp.vl["BLINKERS"][f"LEFT_LAMP{alt}"],
236236
cp.vl["BLINKERS"][f"RIGHT_LAMP{alt}"])
237237
if self.CP.enableBsm:
@@ -320,7 +320,7 @@ def get_can_parsers_canfd(self, CP):
320320
cam_messages += [
321321
("SCC_CONTROL", 50),
322322
]
323-
if CP.flags & HyundaiFlags.CCNC:
323+
if self.CP.flags & HyundaiFlags.CCNC and not self.CP.flags & HyundaiFlags.CANFD_HDA2:
324324
cam_messages += [
325325
("MSG_161", 20),
326326
("MSG_162", 20),

0 commit comments

Comments
 (0)
Please sign in to comment.