mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-01 03:22:07 +08:00
VW MQB: Remove metric units detection (#24280)
old-commit-hash: a959650f3dac9aaa4d9438f3126f5c34d35b3c62
This commit is contained in:
@@ -74,11 +74,6 @@ class CarState(CarStateBase):
|
||||
# Update seatbelt fastened status.
|
||||
ret.seatbeltUnlatched = pt_cp.vl["Airbag_02"]["AB_Gurtschloss_FA"] != 3
|
||||
|
||||
# Update driver preference for metric. VW stores many different unit
|
||||
# preferences, including separate units for for distance vs. speed.
|
||||
# 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.
|
||||
# Infostufe: BSM LED on, Warnung: BSM LED flashing
|
||||
if self.CP.enableBsm:
|
||||
@@ -176,7 +171,6 @@ class CarState(CarStateBase):
|
||||
("EPS_HCA_Status", "LH_EPS_03"), # EPS HCA control status
|
||||
("ESP_Tastung_passiv", "ESP_21"), # Stability control disabled
|
||||
("ESP_Haltebestaetigung", "ESP_21"), # ESP hold confirmation
|
||||
("KBI_MFA_v_Einheit_02", "Einheiten_01"), # MPH vs KMH speed display
|
||||
("KBI_Handbremse", "Kombi_01"), # Manual handbrake applied
|
||||
("TSK_Status", "TSK_06"), # ACC engagement status from drivetrain coordinator
|
||||
("GRA_Hauptschalter", "GRA_ACC_01"), # ACC button, on/off
|
||||
@@ -207,7 +201,6 @@ class CarState(CarStateBase):
|
||||
("Airbag_02", 5), # From J234 Airbag control module
|
||||
("Kombi_01", 2), # From J285 Instrument cluster
|
||||
("Blinkmodi_02", 1), # From J519 BCM (sent at 1Hz when no lights active, 50Hz when active)
|
||||
("Einheiten_01", 1), # From J??? not known if gateway, cluster, or BCM
|
||||
]
|
||||
|
||||
if CP.transmissionType == TransmissionType.automatic:
|
||||
|
||||
@@ -10,7 +10,6 @@ class CarInterface(CarInterfaceBase):
|
||||
def __init__(self, CP, CarController, CarState):
|
||||
super().__init__(CP, CarController, CarState)
|
||||
|
||||
self.displayMetricUnitsPrev = None
|
||||
self.buttonStatesPrev = BUTTON_STATES.copy()
|
||||
|
||||
if CP.networkLocation == NetworkLocation.fwdCamera:
|
||||
@@ -194,7 +193,6 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.buttonEvents = buttonEvents
|
||||
|
||||
# update previous car states
|
||||
self.displayMetricUnitsPrev = self.CS.displayMetricUnits
|
||||
self.buttonStatesPrev = self.CS.buttonStates.copy()
|
||||
|
||||
return ret
|
||||
|
||||
Reference in New Issue
Block a user