Skip to content

Commit

Permalink
Merge branch 'master' of ssh://github.com/commaai/opendbc into 2019-y…
Browse files Browse the repository at this point in the history
…ukon-port
  • Loading branch information
jyoung8607 committed Dec 12, 2024
2 parents 1257ae6 + be9a8f6 commit f8ee212
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
17 changes: 7 additions & 10 deletions opendbc/car/gm/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,27 +172,24 @@ def get_can_parsers(CP):
("ECMAcceleratorPos", 80),
]

if CP.carFingerprint in ALT_ACCS:
pt_messages.append(("ECMCruiseControl", 10))
if CP.transmissionType == TransmissionType.direct:
pt_messages.append(("EBCMRegenPaddle", 50))

if CP.enableBsm:
pt_messages.append(("BCMBlindSpotMonitor", 10))

# Used to read back last counter sent to PT by camera
cam_messages = []
if CP.networkLocation == NetworkLocation.fwdCamera:
pt_messages += [
("ASCMLKASteeringCmd", 0),
]

if CP.transmissionType == TransmissionType.direct:
pt_messages.append(("EBCMRegenPaddle", 50))

cam_messages = []
if CP.networkLocation == NetworkLocation.fwdCamera:
cam_messages += [
("ASCMLKASteeringCmd", 10),
]
if CP.carFingerprint not in ALT_ACCS:

if CP.carFingerprint in ALT_ACCS:
pt_messages.append(("ECMCruiseControl", 10))
else:
cam_messages.append(("ASCMActiveCruiseControlStatus", 25))

if CP.carFingerprint not in SDGM_CAR:
Expand Down
4 changes: 3 additions & 1 deletion opendbc/car/hyundai/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ def __init__(self, CP):
"GEAR_SHIFTER"
if CP.flags & HyundaiFlags.CANFD:
self.shifter_values = can_define.dv[self.gear_msg_canfd]["GEAR"]
elif CP.flags & (HyundaiFlags.HYBRID | HyundaiFlags.EV):
self.shifter_values = can_define.dv["ELECT_GEAR"]["Elect_Gear_Shifter"]
elif self.CP.flags & HyundaiFlags.CLUSTER_GEARS:
self.shifter_values = can_define.dv["CLU15"]["CF_Clu_Gear"]
elif self.CP.flags & HyundaiFlags.TCU_GEARS:
self.shifter_values = can_define.dv["TCU12"]["CUR_GR"]
else: # preferred and elect gear methods use same definition
else:
self.shifter_values = can_define.dv["LVR12"]["CF_Lvr_Gear"]

self.accelerator_msg_canfd = "ACCELERATOR" if CP.flags & HyundaiFlags.EV else \
Expand Down
4 changes: 2 additions & 2 deletions opendbc/dbc/hyundai_kia_generic.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ BO_ 1265 CLU11: 4 CLU
BO_ 1260 Sign_Detection: 8 XXX
SG_ SpeedLim_Nav_Cam : 40|8@1+ (1,0) [0|255] "km/h / mph" XXX
SG_ SpeedLim_Nav_Cam2 : 48|8@1+ (1,0) [0|255] "km/h / mph" XXX

BO_ 1492 TMU_GW_PE_01: 8 CLU
SG_ TMU_IVRActivity : 0|2@1+ (1.0,0.0) [0.0|3.0] "" DATC
SG_ TMU_PhoneActivity : 2|2@1+ (1.0,0.0) [0.0|3.0] "" DATC
Expand Down Expand Up @@ -1661,7 +1661,7 @@ VAL_ 274 CUR_GR 1 "D" 2 "D" 3 "D" 4 "D" 5 "D" 6 "D" 7 "D" 8 "D" 14 "R" 0 "P";
VAL_ 512 HYDROGEN_GEAR_SHIFTER 5 "D" 8 "S" 6 "N" 7 "R" 0 "P";
VAL_ 871 CF_Lvr_IsgState 0 "enabled" 1 "activated" 2 "unknown" 3 "disabled";
VAL_ 871 CF_Lvr_Gear 12 "T" 5 "D" 8 "S" 6 "N" 7 "R" 0 "P";
VAL_ 882 Elect_Gear_Shifter 5 "D" 8 "S" 6 "N" 7 "R" 0 "P";
VAL_ 882 Elect_Gear_Shifter 4 "S" 5 "D" 8 "S" 6 "N" 7 "R" 0 "P";
VAL_ 905 ACCMode 0 "off" 1 "enabled" 2 "driver_override" 3 "off_maybe_fault" 4 "cancelled";
VAL_ 909 CF_VSM_Warn 2 "FCW" 3 "AEB";
VAL_ 916 ACCEnable 0 "SCC ready" 1 "SCC temp fault" 2 "SCC permanent fault" 3 "SCC permanent fault, communication issue";
Expand Down

0 comments on commit f8ee212

Please sign in to comment.