VW MQB: Add support for blind spot monitoring radar (#20242)

* Get steering rate-change sign from the right signal

* Temp remove network-switching reference prior to upstream

* Additional description of BSM signals

* Simplify expression

* Typo

* Update ref_commit

* update refs after merge

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
albatross
Jason Young 2021-03-04 19:48:36 -05:00 committed by GitHub
parent 1a2e67583c
commit 6129a92f38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -60,6 +60,18 @@ class CarState(CarStateBase):
# We use the speed preference for OP.
self.displayMetricUnits = not pt_cp.vl["Einheiten_01"]["KBI_MFA_v_Einheit_02"]
# Consume blind-spot monitoring info/warning LED states, if available. The
# info signal (LED on) is enabled whenever a vehicle is detected in the
# driver's blind spot. The warning signal (LED flashing) is enabled if the
# driver shows possibly hazardous intent toward a BSM detected vehicle, by
# setting the turn signal in that direction, or (for cars with factory Lane
# Assist) approaches the lane boundary in that direction. Size of the BSM
# detection box is dynamic based on speed and road curvature.
# Refer to VW Self Study Program 890253: Volkswagen Driver Assist Systems,
# pages 32-35.
ret.leftBlindspot = bool(pt_cp.vl["SWA_01"]["SWA_Infostufe_SWA_li"]) or bool(pt_cp.vl["SWA_01"]["SWA_Warnung_SWA_li"])
ret.rightBlindspot = bool(pt_cp.vl["SWA_01"]["SWA_Infostufe_SWA_re"]) or bool(pt_cp.vl["SWA_01"]["SWA_Warnung_SWA_re"])
# Update ACC radar status.
accStatus = pt_cp.vl["TSK_06"]['TSK_Status']
if accStatus == 2:
@ -164,6 +176,10 @@ class CarState(CarStateBase):
("GRA_Tip_Stufe_2", "GRA_ACC_01", 0), # unknown related to stalk type
("GRA_ButtonTypeInfo", "GRA_ACC_01", 0), # unknown related to stalk type
("COUNTER", "GRA_ACC_01", 0), # GRA_ACC_01 CAN message counter
("SWA_Infostufe_SWA_li", "SWA_01", 0), # Blind spot object info, left
("SWA_Warnung_SWA_li", "SWA_01", 0), # Blind spot object warning, left
("SWA_Infostufe_SWA_re", "SWA_01", 0), # Blind spot object info, right
("SWA_Warnung_SWA_re", "SWA_01", 0), # Blind spot object warning, right
]
checks = [

View File

@ -1 +1 @@
21cbc622d0389e09806b33f91912f1a28872cf07
4d9227b024fd223bb07e5910c6a84d7493c42270