GM: Add BSM from Powertrain Bus (#30861)
* Add GM BSM * Move BSM check to fwdCam only * Detect if BSM message if present * Remove hardcoding * Apply Commit Suggestion Co-authored-by: Shane Smiskol <shane@smiskol.com> * Cleanup Suggestions * bump opendbc * test out bsm * BCMBlindSpotMonitors -> BCMBlindSpotMonitor * Revert "test out bsm" This reverts commit 0e166530e60165269c1be200f48ead9918d5fe96. * up here --------- Co-authored-by: Shane Smiskol <shane@smiskol.com> old-commit-hash: 58ef40eb2264a9d62a1715486677c342d5d113ce
This commit is contained in:
2
opendbc
2
opendbc
Submodule opendbc updated: f4b1061ae0...3cfd0bf4eb
@@ -113,6 +113,10 @@ class CarState(CarStateBase):
|
||||
if self.CP.pcmCruise:
|
||||
ret.cruiseState.nonAdaptive = cam_cp.vl["ASCMActiveCruiseControlStatus"]["ACCCruiseState"] not in (2, 3)
|
||||
|
||||
if self.CP.enableBsm:
|
||||
ret.leftBlindspot = pt_cp.vl["BCMBlindSpotMonitor"]["LeftBSM"] == 1
|
||||
ret.rightBlindspot = pt_cp.vl["BCMBlindSpotMonitor"]["RightBSM"] == 1
|
||||
|
||||
return ret
|
||||
|
||||
@staticmethod
|
||||
@@ -146,6 +150,9 @@ class CarState(CarStateBase):
|
||||
("ECMAcceleratorPos", 80),
|
||||
]
|
||||
|
||||
if CP.enableBsm:
|
||||
messages.append(("BCMBlindSpotMonitor", 10))
|
||||
|
||||
# Used to read back last counter sent to PT by camera
|
||||
if CP.networkLocation == NetworkLocation.fwdCamera:
|
||||
messages += [
|
||||
|
||||
@@ -72,6 +72,7 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.carName = "gm"
|
||||
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.gm)]
|
||||
ret.autoResumeSng = False
|
||||
ret.enableBsm = 0x142 in fingerprint[CanBus.POWERTRAIN]
|
||||
|
||||
if candidate in EV_CAR:
|
||||
ret.transmissionType = TransmissionType.direct
|
||||
|
||||
Reference in New Issue
Block a user