mirror of https://github.com/commaai/openpilot.git
Lane Departure Warning: fix desire index bug (#28119)
don't subtract 1
old-commit-hash: 4e951e4524
This commit is contained in:
parent
4f88c90d83
commit
6f0efe4ea0
|
@ -707,8 +707,8 @@ class Controls:
|
|||
if len(desire_prediction) and ldw_allowed:
|
||||
right_lane_visible = model_v2.laneLineProbs[2] > 0.5
|
||||
left_lane_visible = model_v2.laneLineProbs[1] > 0.5
|
||||
l_lane_change_prob = desire_prediction[Desire.laneChangeLeft - 1]
|
||||
r_lane_change_prob = desire_prediction[Desire.laneChangeRight - 1]
|
||||
l_lane_change_prob = desire_prediction[Desire.laneChangeLeft]
|
||||
r_lane_change_prob = desire_prediction[Desire.laneChangeRight]
|
||||
|
||||
lane_lines = model_v2.laneLines
|
||||
l_lane_close = left_lane_visible and (lane_lines[1].y[0] > -(1.08 + CAMERA_OFFSET))
|
||||
|
|
Loading…
Reference in New Issue