|
|
@ -8,24 +8,17 @@ def create_pq_steering_control(packer, bus, apply_steer, idx, lkas_enabled): |
|
|
|
|
|
|
|
|
|
|
|
return packer.make_can_msg("HCA_1", bus, values, idx) |
|
|
|
return packer.make_can_msg("HCA_1", bus, values, idx) |
|
|
|
|
|
|
|
|
|
|
|
def create_pq_hud_control(packer, bus, hca_enabled, steering_pressed, hud_alert, left_lane_visible, right_lane_visible, |
|
|
|
def create_pq_hud_control(packer, bus, enabled, steering_pressed, hud_alert, left_lane_visible, right_lane_visible, |
|
|
|
ldw_stock_values, left_lane_depart, right_lane_depart): |
|
|
|
ldw_stock_values, left_lane_depart, right_lane_depart): |
|
|
|
if hca_enabled: |
|
|
|
values = ldw_stock_values.copy() |
|
|
|
left_lane_hud = 3 if left_lane_depart else 1 + left_lane_visible |
|
|
|
values.update({ |
|
|
|
right_lane_hud = 3 if right_lane_depart else 1 + right_lane_visible |
|
|
|
"LDW_Lampe_gelb": 1 if enabled and steering_pressed else 0, |
|
|
|
else: |
|
|
|
"LDW_Lampe_gruen": 1 if enabled and not steering_pressed else 0, |
|
|
|
left_lane_hud = 0 |
|
|
|
"LDW_Lernmodus_links": 3 if left_lane_depart else 1 + left_lane_visible, |
|
|
|
right_lane_hud = 0 |
|
|
|
"LDW_Lernmodus_rechts": 3 if right_lane_depart else 1 + right_lane_visible, |
|
|
|
|
|
|
|
|
|
|
|
values = { |
|
|
|
|
|
|
|
"Right_Lane_Status": right_lane_hud, |
|
|
|
|
|
|
|
"Left_Lane_Status": left_lane_hud, |
|
|
|
|
|
|
|
"SET_ME_X1": 1, |
|
|
|
|
|
|
|
"Kombi_Lamp_Orange": 1 if hca_enabled and steering_pressed else 0, |
|
|
|
|
|
|
|
"Kombi_Lamp_Green": 1 if hca_enabled and not steering_pressed else 0, |
|
|
|
|
|
|
|
"LDW_Textbits": hud_alert, |
|
|
|
"LDW_Textbits": hud_alert, |
|
|
|
} |
|
|
|
}) |
|
|
|
return packer.make_can_msg("LDW_1", bus, values) |
|
|
|
return packer.make_can_msg("LDW_Status", bus, values) |
|
|
|
|
|
|
|
|
|
|
|
def create_pq_acc_buttons_control(packer, bus, buttonStatesToSend, CS, idx): |
|
|
|
def create_pq_acc_buttons_control(packer, bus, buttonStatesToSend, CS, idx): |
|
|
|
values = { |
|
|
|
values = { |
|
|
|