ui: fix wrong path color indexing (#33350)

* fix

* clean up

* clean up

* clean up
old-commit-hash: d8c9822421
pull/33386/head
Shane Smiskol 9 months ago committed by GitHub
parent 8d4770a65a
commit d69c1f600b
  1. 2
      selfdrive/ui/qt/onroad/annotated_camera.cc

@ -177,7 +177,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
for (int i = 0; i < max_len; ++i) {
// Some points are out of frame
int track_idx = (scene.track_vertices.length() / 2) - i; // flip idx to start from top
int track_idx = max_len - i - 1; // flip idx to start from bottom right
if (scene.track_vertices[track_idx].y() < 0 || scene.track_vertices[track_idx].y() > height()) continue;
// Flip so 0 is bottom of frame

Loading…
Cancel
Save