|
|
@ -119,8 +119,15 @@ class CarState(CarStateBase): |
|
|
|
# currently regulating speed (3), driver accel override (4), brake only (5) |
|
|
|
# currently regulating speed (3), driver accel override (4), brake only (5) |
|
|
|
ret.cruiseState.available = pt_cp.vl["TSK_06"]["TSK_Status"] in (2, 3, 4, 5) |
|
|
|
ret.cruiseState.available = pt_cp.vl["TSK_06"]["TSK_Status"] in (2, 3, 4, 5) |
|
|
|
ret.cruiseState.enabled = pt_cp.vl["TSK_06"]["TSK_Status"] in (3, 4, 5) |
|
|
|
ret.cruiseState.enabled = pt_cp.vl["TSK_06"]["TSK_Status"] in (3, 4, 5) |
|
|
|
# Speed limiter mode; ECM faults if we command ACC while not pcmCruise |
|
|
|
|
|
|
|
ret.cruiseState.nonAdaptive = bool(pt_cp.vl["TSK_06"]["TSK_Limiter_ausgewaehlt"]) |
|
|
|
if self.CP.pcmCruise: |
|
|
|
|
|
|
|
# Cruise Control mode; check for distance UI setting from the radar. |
|
|
|
|
|
|
|
# ECM does not manage this, so do not need to check for openpilot longitudinal |
|
|
|
|
|
|
|
ret.cruiseState.nonAdaptive = ext_cp.vl["ACC_02"]["ACC_Gesetzte_Zeitluecke"] == 0 |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
# Speed limiter mode; ECM faults if we command ACC while not pcmCruise |
|
|
|
|
|
|
|
ret.cruiseState.nonAdaptive = bool(pt_cp.vl["TSK_06"]["TSK_Limiter_ausgewaehlt"]) |
|
|
|
|
|
|
|
|
|
|
|
ret.accFaulted = pt_cp.vl["TSK_06"]["TSK_Status"] in (6, 7) |
|
|
|
ret.accFaulted = pt_cp.vl["TSK_06"]["TSK_Status"] in (6, 7) |
|
|
|
|
|
|
|
|
|
|
|
self.esp_hold_confirmation = bool(pt_cp.vl["ESP_21"]["ESP_Haltebestaetigung"]) |
|
|
|
self.esp_hold_confirmation = bool(pt_cp.vl["ESP_21"]["ESP_Haltebestaetigung"]) |
|
|
|