|
|
|
@ -18,10 +18,19 @@ def create_mqb_steering_control(packer, bus, apply_steer, idx, lkas_enabled): |
|
|
|
|
def create_mqb_hud_control(packer, bus, enabled, steering_pressed, hud_alert, left_lane_visible, right_lane_visible, |
|
|
|
|
ldw_lane_warning_left, ldw_lane_warning_right, ldw_side_dlc_tlc, ldw_dlc, ldw_tlc, |
|
|
|
|
standstill, left_lane_depart, right_lane_depart): |
|
|
|
|
# Lane color reference: |
|
|
|
|
# 0 - nothing (LKAS disabled) |
|
|
|
|
# 1 - gray (LKAS enabled, no lane line detected) |
|
|
|
|
# 2 - green on VW, green or white on Audi depedning on year or virtual cockpit (LKAS enabled, lane detected) |
|
|
|
|
# 3 - green with arrow on VW, red on Audi (LKAS enabled, lane departure detected) |
|
|
|
|
|
|
|
|
|
# not using standstill right now |
|
|
|
|
|
|
|
|
|
if enabled: |
|
|
|
|
left_lane_hud = 3 if left_lane_visible and not standstill else 2 |
|
|
|
|
right_lane_hud = 3 if right_lane_visible and not standstill else 2 |
|
|
|
|
left_lane_hud = 2 if left_lane_visible else 1 |
|
|
|
|
right_lane_hud = 2 if right_lane_visible else 1 |
|
|
|
|
else: |
|
|
|
|
# On stock, this would be 0, but on stock you'd never go from 0 to 3. Currently OP will still detect lane departures so always be at least 1. |
|
|
|
|
left_lane_hud = 1 |
|
|
|
|
right_lane_hud = 1 |
|
|
|
|
|
|
|
|
|