|
|
@ -20,7 +20,7 @@ class CarController(): |
|
|
|
|
|
|
|
|
|
|
|
self.steer_rate_limited = False |
|
|
|
self.steer_rate_limited = False |
|
|
|
|
|
|
|
|
|
|
|
def update(self, enabled, CS, frame, actuators, visual_alert, left_lane_visible, right_lane_visible): |
|
|
|
def update(self, enabled, CS, frame, actuators, visual_alert, left_lane_visible, right_lane_visible, left_lane_depart, right_lane_depart): |
|
|
|
""" Controls thread """ |
|
|
|
""" Controls thread """ |
|
|
|
|
|
|
|
|
|
|
|
P = CarControllerParams |
|
|
|
P = CarControllerParams |
|
|
@ -110,18 +110,18 @@ class CarController(): |
|
|
|
# filters LDW_02 from the factory camera and OP emits LDW_02 at 10Hz. |
|
|
|
# filters LDW_02 from the factory camera and OP emits LDW_02 at 10Hz. |
|
|
|
|
|
|
|
|
|
|
|
if frame % P.LDW_STEP == 0: |
|
|
|
if frame % P.LDW_STEP == 0: |
|
|
|
hcaEnabled = True if enabled and not CS.out.standstill else False |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if visual_alert == car.CarControl.HUDControl.VisualAlert.steerRequired: |
|
|
|
if visual_alert == car.CarControl.HUDControl.VisualAlert.steerRequired: |
|
|
|
hud_alert = MQB_LDW_MESSAGES["laneAssistTakeOverSilent"] |
|
|
|
hud_alert = MQB_LDW_MESSAGES["laneAssistTakeOverSilent"] |
|
|
|
else: |
|
|
|
else: |
|
|
|
hud_alert = MQB_LDW_MESSAGES["none"] |
|
|
|
hud_alert = MQB_LDW_MESSAGES["none"] |
|
|
|
|
|
|
|
|
|
|
|
can_sends.append(volkswagencan.create_mqb_hud_control(self.packer_pt, CANBUS.pt, hcaEnabled, |
|
|
|
|
|
|
|
|
|
|
|
can_sends.append(volkswagencan.create_mqb_hud_control(self.packer_pt, CANBUS.pt, enabled, |
|
|
|
CS.out.steeringPressed, hud_alert, left_lane_visible, |
|
|
|
CS.out.steeringPressed, hud_alert, left_lane_visible, |
|
|
|
right_lane_visible, CS.ldw_lane_warning_left, |
|
|
|
right_lane_visible, CS.ldw_lane_warning_left, |
|
|
|
CS.ldw_lane_warning_right, CS.ldw_side_dlc_tlc, |
|
|
|
CS.ldw_lane_warning_right, CS.ldw_side_dlc_tlc, |
|
|
|
CS.ldw_dlc, CS.ldw_tlc)) |
|
|
|
CS.ldw_dlc, CS.ldw_tlc, CS.out.standstill, |
|
|
|
|
|
|
|
left_lane_depart, right_lane_depart)) |
|
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------- |
|
|
|
#-------------------------------------------------------------------------- |
|
|
|
# # |
|
|
|
# # |
|
|
|