@ -9,7 +9,7 @@ def create_steering_control(packer, bus, apply_steer, lkas_enabled):
return packer . make_can_msg ( " HCA_1 " , bus , values )
return packer . make_can_msg ( " HCA_1 " , bus , values )
def create_lka_hud_control ( packer , bus , ldw_stock_values , enabled , steering_pressed , hud_alert , hud_control ) :
def create_lka_hud_control ( packer , bus , ldw_stock_values , lat_active , steering_pressed , hud_alert , hud_control ) :
values = { }
values = { }
if len ( ldw_stock_values ) :
if len ( ldw_stock_values ) :
values = { s : ldw_stock_values [ s ] for s in [
values = { s : ldw_stock_values [ s ] for s in [
@ -21,8 +21,8 @@ def create_lka_hud_control(packer, bus, ldw_stock_values, enabled, steering_pres
] }
] }
values . update ( {
values . update ( {
" LDW_Lampe_gelb " : 1 if enabled and steering_pressed else 0 ,
" LDW_Lampe_gelb " : 1 if lat_active and steering_pressed else 0 ,
" LDW_Lampe_gruen " : 1 if enabled and not steering_pressed else 0 ,
" LDW_Lampe_gruen " : 1 if lat_active and not steering_pressed else 0 ,
" LDW_Lernmodus_links " : 3 if hud_control . leftLaneDepart else 1 + hud_control . leftLaneVisible ,
" LDW_Lernmodus_links " : 3 if hud_control . leftLaneDepart else 1 + hud_control . leftLaneVisible ,
" LDW_Lernmodus_rechts " : 3 if hud_control . rightLaneDepart else 1 + hud_control . rightLaneVisible ,
" LDW_Lernmodus_rechts " : 3 if hud_control . rightLaneDepart else 1 + hud_control . rightLaneVisible ,
" LDW_Textbits " : hud_alert ,
" LDW_Textbits " : hud_alert ,