@ -13,6 +13,7 @@ class CarState(CarStateBase):
self . CCP = CarControllerParams ( CP )
self . button_states = { button . event_type : False for button in self . CCP . BUTTONS }
self . esp_hold_confirmation = False
self . upscale_lead_car_signal = False
def create_button_events ( self , pt_cp , buttons ) :
button_events = [ ]
@ -141,6 +142,9 @@ class CarState(CarStateBase):
# Additional safety checks performed in CarInterface.
ret . espDisabled = pt_cp . vl [ " ESP_21 " ] [ " ESP_Tastung_passiv " ] != 0
# Digital instrument clusters expect the ACC HUD lead car distance to be scaled differently
self . upscale_lead_car_signal = bool ( pt_cp . vl [ " Kombi_03 " ] [ " KBI_Variante " ] )
return ret
def update_pq ( self , pt_cp , cam_cp , ext_cp , trans_type ) :
@ -281,6 +285,7 @@ class CarState(CarStateBase):
( " ESP_Tastung_passiv " , " ESP_21 " ) , # Stability control disabled
( " ESP_Haltebestaetigung " , " ESP_21 " ) , # ESP hold confirmation
( " KBI_Handbremse " , " Kombi_01 " ) , # Manual handbrake applied
( " KBI_Variante " , " Kombi_03 " ) , # Digital/full-screen instrument cluster installed
( " TSK_Status " , " TSK_06 " ) , # ACC engagement status from drivetrain coordinator
( " GRA_Hauptschalter " , " GRA_ACC_01 " ) , # ACC button, on/off
( " GRA_Abbrechen " , " GRA_ACC_01 " ) , # ACC button, cancel
@ -312,6 +317,7 @@ 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)
( " Kombi_03 " , 0 ) , # From J285 instrument cluster (not present on older cars, 1Hz when present)
]
if CP . transmissionType == TransmissionType . automatic :