Chrysler BSM info signal (#20694)

* Chrysler BSM info signal

* change to ==1

* add checks to enable bsm

* add fingerprint can id for enableBsm

* gate behind enableBsm

* fix indenatation

* update refs

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
albatross
xps-genesis 2021-05-04 23:37:39 -04:00 committed by GitHub
parent 847dae80fe
commit 1e473d764a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View File

@ -59,6 +59,10 @@ class CarState(CarStateBase):
ret.steerError = steer_state == 4 or (steer_state == 0 and ret.vEgo > self.CP.minSteerSpeed)
ret.genericToggle = bool(cp.vl["STEERING_LEVERS"]['HIGH_BEAM_FLASH'])
if self.CP.enableBsm:
ret.leftBlindspot = cp.vl["BLIND_SPOT_WARNINGS"]['BLIND_SPOT_LEFT'] == 1
ret.rightBlindspot = cp.vl["BLIND_SPOT_WARNINGS"]['BLIND_SPOT_RIGHT'] == 1
self.lkas_counter = cp_cam.vl["LKAS_COMMAND"]['COUNTER']
self.lkas_car_model = cp_cam.vl["LKAS_HUD"]['CAR_MODEL']
@ -115,6 +119,13 @@ class CarState(CarStateBase):
("TRACTION_BUTTON", 1),
]
if CP.enableBsm:
signals += [
("BLIND_SPOT_RIGHT", "BLIND_SPOT_WARNINGS", 0),
("BLIND_SPOT_LEFT", "BLIND_SPOT_WARNINGS", 0),
]
checks += [("BLIND_SPOT_WARNINGS", 2)]
return CANParser(DBC[CP.carFingerprint]['pt'], signals, checks, 0)
@staticmethod

View File

@ -50,6 +50,8 @@ class CarInterface(CarInterfaceBase):
ret.tireStiffnessFront, ret.tireStiffnessRear = scale_tire_stiffness(ret.mass, ret.wheelbase, ret.centerToFront)
ret.enableCamera = True
ret.enableBsm = 720 in fingerprint[0]
return ret

View File

@ -1 +1 @@
102840c395c0c19fb27a8f252044284834a0daf1
f1515b6efca6de7305d411355f286d2c6b9fb19b