Skip to content

Commit be9a8f6

Browse files
authored
GM: CAN parser cleanup, prep for Yukon (#1571)
GM: Refactor and prep for Yukon
1 parent e9e6e33 commit be9a8f6

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

opendbc/car/gm/carstate.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,24 +166,22 @@ def get_can_parsers(CP):
166166
("ECMAcceleratorPos", 80),
167167
]
168168

169+
if CP.transmissionType == TransmissionType.direct:
170+
pt_messages.append(("EBCMRegenPaddle", 50))
171+
169172
if CP.enableBsm:
170173
pt_messages.append(("BCMBlindSpotMonitor", 10))
171174

172-
# Used to read back last counter sent to PT by camera
175+
cam_messages = []
173176
if CP.networkLocation == NetworkLocation.fwdCamera:
174177
pt_messages += [
175178
("ASCMLKASteeringCmd", 0),
176179
]
177-
178-
if CP.transmissionType == TransmissionType.direct:
179-
pt_messages.append(("EBCMRegenPaddle", 50))
180-
181-
cam_messages = []
182-
if CP.networkLocation == NetworkLocation.fwdCamera:
183180
cam_messages += [
184181
("ASCMLKASteeringCmd", 10),
185182
("ASCMActiveCruiseControlStatus", 25),
186183
]
184+
187185
if CP.carFingerprint not in SDGM_CAR:
188186
cam_messages += [
189187
("AEBCmd", 10),

0 commit comments

Comments
 (0)