|
|
@ -93,12 +93,11 @@ class CarState(CarStateBase): |
|
|
|
ret.stockAeb = bool(ext_cp.vl["ACC_10"]["ANB_Teilbremsung_Freigabe"]) or bool(ext_cp.vl["ACC_10"]["ANB_Zielbremsung_Freigabe"]) |
|
|
|
ret.stockAeb = bool(ext_cp.vl["ACC_10"]["ANB_Teilbremsung_Freigabe"]) or bool(ext_cp.vl["ACC_10"]["ANB_Zielbremsung_Freigabe"]) |
|
|
|
|
|
|
|
|
|
|
|
# Update ACC radar status. |
|
|
|
# Update ACC radar status. |
|
|
|
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 overrun coast-down (5) |
|
|
|
# ACC okay and enabled, currently regulating speed (3) or driver accel override (4) or overrun coast-down (5) |
|
|
|
ret.cruiseState.available = True |
|
|
|
ret.cruiseState.available = True |
|
|
|
ret.cruiseState.enabled = True |
|
|
|
ret.cruiseState.enabled = True |
|
|
@ -106,6 +105,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 = pt_cp.vl["TSK_06"]["TSK_Status"] in (6, 7) |
|
|
|
|
|
|
|
|
|
|
|
# Update ACC setpoint. When the setpoint is zero or there's an error, the |
|
|
|
# Update ACC setpoint. When the setpoint is zero or there's an error, the |
|
|
|
# radar sends a set-speed of ~90.69 m/s / 203mph. |
|
|
|
# radar sends a set-speed of ~90.69 m/s / 203mph. |
|
|
|