Add GM BSM

Co-Authored-By: garrettpall <76917194+garrettpall@users.noreply.github.com>
This commit is contained in:
FrogAi
2024-01-12 22:39:30 -07:00
parent beb4faf213
commit d1bee2c971
3 changed files with 12 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ BUTTONS_DICT = {CruiseButtons.RES_ACCEL: ButtonType.accelCruise, CruiseButtons.D
CruiseButtons.MAIN: ButtonType.altButton3, CruiseButtons.CANCEL: ButtonType.cancel}
ACCELERATOR_POS_MSG = 0xbe
BSM_MSG = 0x142
NON_LINEAR_TORQUE_PARAMS = {
CAR.BOLT_EUV: [2.6531724862969748, 1.0, 0.1919764879840985, 0.009054123646805178],
@@ -299,6 +300,9 @@ class CarInterface(CarInterfaceBase):
if ACCELERATOR_POS_MSG not in fingerprint[CanBus.POWERTRAIN]:
ret.flags |= GMFlags.NO_ACCELERATOR_POS_MSG.value
# Detect if BSM message is present
ret.enableBsm = BSM_MSG in fingerprint[CanBus.POWERTRAIN]
return ret
# returns a car.CarState