Add GM BSM
Co-Authored-By: garrettpall <76917194+garrettpall@users.noreply.github.com>
This commit is contained in:
@@ -125,6 +125,10 @@ BO_ 320 BCMTurnSignals: 3 K9_BCM
|
|||||||
SG_ HighBeamsActive : 7|1@0+ (1,0) [0|1] "" XXX
|
SG_ HighBeamsActive : 7|1@0+ (1,0) [0|1] "" XXX
|
||||||
SG_ HighBeamsTemporary : 5|1@0+ (1,0) [0|1] "" XXX
|
SG_ HighBeamsTemporary : 5|1@0+ (1,0) [0|1] "" XXX
|
||||||
|
|
||||||
|
BO_ 322 BCMBSM: 7 K9_BCM
|
||||||
|
SG_ Left_BSM : 6|1@0+ (1,0) [0|1] "" XXX
|
||||||
|
SG_ Right_BSM : 7|1@0+ (1,0) [0|1] "" XXX
|
||||||
|
|
||||||
BO_ 328 PSCM_148: 1 K43_PSCM
|
BO_ 328 PSCM_148: 1 K43_PSCM
|
||||||
|
|
||||||
BO_ 381 ESPStatus: 6 K20_ECM
|
BO_ 381 ESPStatus: 6 K20_ECM
|
||||||
|
|||||||
@@ -35,6 +35,10 @@ class CarState(CarStateBase):
|
|||||||
self.pscm_status = copy.copy(pt_cp.vl["PSCMStatus"])
|
self.pscm_status = copy.copy(pt_cp.vl["PSCMStatus"])
|
||||||
self.moving_backward = pt_cp.vl["EBCMWheelSpdRear"]["MovingBackward"] != 0
|
self.moving_backward = pt_cp.vl["EBCMWheelSpdRear"]["MovingBackward"] != 0
|
||||||
|
|
||||||
|
if self.CP.enableBsm:
|
||||||
|
ret.leftBlindspot = pt_cp.vl["BCMBSM"]["Left_BSM"] == 1
|
||||||
|
ret.rightBlindspot = pt_cp.vl["BCMBSM"]["Right_BSM"] == 1
|
||||||
|
|
||||||
# Variables used for avoiding LKAS faults
|
# Variables used for avoiding LKAS faults
|
||||||
self.loopback_lka_steering_cmd_updated = len(loopback_cp.vl_all["ASCMLKASteeringCmd"]["RollingCounter"]) > 0
|
self.loopback_lka_steering_cmd_updated = len(loopback_cp.vl_all["ASCMLKASteeringCmd"]["RollingCounter"]) > 0
|
||||||
if self.loopback_lka_steering_cmd_updated:
|
if self.loopback_lka_steering_cmd_updated:
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ BUTTONS_DICT = {CruiseButtons.RES_ACCEL: ButtonType.accelCruise, CruiseButtons.D
|
|||||||
CruiseButtons.MAIN: ButtonType.altButton3, CruiseButtons.CANCEL: ButtonType.cancel}
|
CruiseButtons.MAIN: ButtonType.altButton3, CruiseButtons.CANCEL: ButtonType.cancel}
|
||||||
|
|
||||||
ACCELERATOR_POS_MSG = 0xbe
|
ACCELERATOR_POS_MSG = 0xbe
|
||||||
|
BSM_MSG = 0x142
|
||||||
|
|
||||||
NON_LINEAR_TORQUE_PARAMS = {
|
NON_LINEAR_TORQUE_PARAMS = {
|
||||||
CAR.BOLT_EUV: [2.6531724862969748, 1.0, 0.1919764879840985, 0.009054123646805178],
|
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]:
|
if ACCELERATOR_POS_MSG not in fingerprint[CanBus.POWERTRAIN]:
|
||||||
ret.flags |= GMFlags.NO_ACCELERATOR_POS_MSG.value
|
ret.flags |= GMFlags.NO_ACCELERATOR_POS_MSG.value
|
||||||
|
|
||||||
|
# Detect if BSM message is present
|
||||||
|
ret.enableBsm = BSM_MSG in fingerprint[CanBus.POWERTRAIN]
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
# returns a car.CarState
|
# returns a car.CarState
|
||||||
|
|||||||
Reference in New Issue
Block a user