|
|
@ -107,12 +107,11 @@ class CarState(CarStateBase): |
|
|
|
|
|
|
|
|
|
|
|
# Update ACC radar status. |
|
|
|
# Update ACC radar status. |
|
|
|
self.acc_type = ext_cp.vl["ACC_06"]["ACC_Typ"] |
|
|
|
self.acc_type = ext_cp.vl["ACC_06"]["ACC_Typ"] |
|
|
|
self.tsk_status = pt_cp.vl["TSK_06"]["TSK_Status"] |
|
|
|
if pt_cp.vl["TSK_06"]["TSK_Status"] == 2: |
|
|
|
if self.tsk_status == 2: |
|
|
|
|
|
|
|
# ACC okay and enabled, but not currently engaged |
|
|
|
# ACC okay and enabled, but not currently engaged |
|
|
|
ret.cruiseState.available = True |
|
|
|
ret.cruiseState.available = True |
|
|
|
ret.cruiseState.enabled = False |
|
|
|
ret.cruiseState.enabled = False |
|
|
|
elif self.tsk_status in (3, 4, 5): |
|
|
|
elif pt_cp.vl["TSK_06"]["TSK_Status"] in (3, 4, 5): |
|
|
|
# ACC okay and enabled, currently regulating speed (3) or driver accel override (4) or brake only (5) |
|
|
|
# ACC okay and enabled, currently regulating speed (3) or driver accel override (4) or brake only (5) |
|
|
|
ret.cruiseState.available = True |
|
|
|
ret.cruiseState.available = True |
|
|
|
ret.cruiseState.enabled = True |
|
|
|
ret.cruiseState.enabled = True |
|
|
@ -120,6 +119,7 @@ class CarState(CarStateBase): |
|
|
|
# ACC okay but disabled (1), or a radar visibility or other fault/disruption (6 or 7) |
|
|
|
# ACC okay but disabled (1), or a radar visibility or other fault/disruption (6 or 7) |
|
|
|
ret.cruiseState.available = False |
|
|
|
ret.cruiseState.available = False |
|
|
|
ret.cruiseState.enabled = False |
|
|
|
ret.cruiseState.enabled = False |
|
|
|
|
|
|
|
ret.accFaulted = True |
|
|
|
ret.cruiseState.standstill = bool(pt_cp.vl["ESP_21"]["ESP_Haltebestaetigung"]) |
|
|
|
ret.cruiseState.standstill = bool(pt_cp.vl["ESP_21"]["ESP_Haltebestaetigung"]) |
|
|
|
ret.accFaulted = pt_cp.vl["TSK_06"]["TSK_Status"] in (6, 7) |
|
|
|
ret.accFaulted = pt_cp.vl["TSK_06"]["TSK_Status"] in (6, 7) |
|
|
|
|
|
|
|
|
|
|
|