From d69c1f600be4b36224a0f23975ed137be1b6f318 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 20 Aug 2024 20:49:30 -0700 Subject: [PATCH] ui: fix wrong path color indexing (#33350) * fix * clean up * clean up * clean up old-commit-hash: d8c982242118b25ef2ad0dc25113907a53669593 --- selfdrive/ui/qt/onroad/annotated_camera.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/ui/qt/onroad/annotated_camera.cc b/selfdrive/ui/qt/onroad/annotated_camera.cc index 484075b3e2..c7ffa9b410 100644 --- a/selfdrive/ui/qt/onroad/annotated_camera.cc +++ b/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