|
|
|
@ -61,25 +61,17 @@ class CarState(CarStateBase): |
|
|
|
|
self.displayMetricUnits = not pt_cp.vl["Einheiten_01"]["KBI_MFA_v_Einheit_02"] |
|
|
|
|
|
|
|
|
|
# Update ACC radar status. |
|
|
|
|
accStatus = pt_cp.vl["ACC_06"]['ACC_Status_ACC'] |
|
|
|
|
if accStatus == 1: |
|
|
|
|
# ACC okay but disabled |
|
|
|
|
self.accFault = False |
|
|
|
|
ret.cruiseState.available = False |
|
|
|
|
ret.cruiseState.enabled = False |
|
|
|
|
elif accStatus == 2: |
|
|
|
|
accStatus = pt_cp.vl["TSK_06"]['TSK_Status'] |
|
|
|
|
if accStatus == 2: |
|
|
|
|
# ACC okay and enabled, but not currently engaged |
|
|
|
|
self.accFault = False |
|
|
|
|
ret.cruiseState.available = True |
|
|
|
|
ret.cruiseState.enabled = False |
|
|
|
|
elif accStatus in [3, 4, 5]: |
|
|
|
|
# ACC okay and enabled, currently engaged and regulating speed (3) or engaged with driver accelerating (4) or overrun (5) |
|
|
|
|
self.accFault = False |
|
|
|
|
ret.cruiseState.available = True |
|
|
|
|
ret.cruiseState.enabled = True |
|
|
|
|
else: |
|
|
|
|
# ACC fault of some sort. Seen statuses 6 or 7 for CAN comms disruptions, visibility issues, etc. |
|
|
|
|
self.accFault = True |
|
|
|
|
# ACC okay but disabled (1), or a radar visibility or other fault/disruption (6 or 7) |
|
|
|
|
ret.cruiseState.available = False |
|
|
|
|
ret.cruiseState.enabled = False |
|
|
|
|
|
|
|
|
@ -156,6 +148,7 @@ class CarState(CarStateBase): |
|
|
|
|
("ESP_Tastung_passiv", "ESP_21", 0), # Stability control disabled |
|
|
|
|
("KBI_MFA_v_Einheit_02", "Einheiten_01", 0), # MPH vs KMH speed display |
|
|
|
|
("KBI_Handbremse", "Kombi_01", 0), # Manual handbrake applied |
|
|
|
|
("TSK_Status", "TSK_06", 0), # ACC engagement status from drivetrain coordinator |
|
|
|
|
("TSK_Fahrzeugmasse_02", "Motor_16", 0), # Estimated vehicle mass from drivetrain coordinator |
|
|
|
|
("ACC_Status_ACC", "ACC_06", 0), # ACC engagement status |
|
|
|
|
("ACC_Typ", "ACC_06", 0), # ACC type (follow to stop, stop&go) |
|
|
|
@ -182,6 +175,7 @@ class CarState(CarStateBase): |
|
|
|
|
("ESP_21", 50), # From J104 ABS/ESP controller |
|
|
|
|
("ACC_06", 50), # From J428 ACC radar control module |
|
|
|
|
("Motor_20", 50), # From J623 Engine control module |
|
|
|
|
("TSK_06", 50), # From J623 Engine control module |
|
|
|
|
("GRA_ACC_01", 33), # From J??? steering wheel control buttons |
|
|
|
|
("ACC_02", 17), # From J428 ACC radar control module |
|
|
|
|
("Getriebe_11", 20), # From J743 Auto transmission control module |
|
|
|
|