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 0e166530e6.

* up here

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
pull/31196/head
garrettpall 1 year ago committed by GitHub
parent be4107dc8a
commit 58ef40eb22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      opendbc
  2. 7
      selfdrive/car/gm/carstate.py
  3. 1
      selfdrive/car/gm/interface.py

@ -1 +1 @@
Subproject commit f4b1061ae03994013809dc4a03ac571bfeda5714
Subproject commit 3cfd0bf4eb73953f3d179dddc1ba2c92e317188c

@ -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

Loading…
Cancel
Save