From fe43d51686da19063c4ee3ebdb09eadfdd3a56ad Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Mon, 17 Aug 2020 18:06:09 +0800 Subject: [PATCH] paint.cc: remove redundant calls (#2025) * remove redundant calls * set MODEL_LANE_PATH_CNT=2 --- selfdrive/ui/paint.cc | 4 +--- selfdrive/ui/ui.hpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/selfdrive/ui/paint.cc b/selfdrive/ui/paint.cc index baa9dd04..6dca88f5 100644 --- a/selfdrive/ui/paint.cc +++ b/selfdrive/ui/paint.cc @@ -305,15 +305,13 @@ static void update_lane_line_data(UIState *s, const float *points, float off, mo static void update_all_lane_lines_data(UIState *s, const PathData &path, model_path_vertices_data *pstart) { update_lane_line_data(s, path.points, 0.025*path.prob, pstart, path.validLen); float var = fmin(path.std, 0.7); - update_lane_line_data(s, path.points, -var, pstart + 1, path.validLen); - update_lane_line_data(s, path.points, var, pstart + 2, path.validLen); + update_lane_line_data(s, path.points, var, pstart + 1, path.validLen); } static void ui_draw_lane(UIState *s, const PathData *path, model_path_vertices_data *pstart, NVGcolor color) { ui_draw_lane_line(s, pstart, color); color.a /= 25; ui_draw_lane_line(s, pstart + 1, color); - ui_draw_lane_line(s, pstart + 2, color); } static void ui_draw_vision_lanes(UIState *s) { diff --git a/selfdrive/ui/ui.hpp b/selfdrive/ui/ui.hpp index bf64ef27..24a982db 100644 --- a/selfdrive/ui/ui.hpp +++ b/selfdrive/ui/ui.hpp @@ -75,7 +75,7 @@ const int home_btn_y = vwp_h - home_btn_h - 40; const int UI_FREQ = 30; // Hz const int MODEL_PATH_MAX_VERTICES_CNT = 98; -const int MODEL_LANE_PATH_CNT = 3; +const int MODEL_LANE_PATH_CNT = 2; const int TRACK_POINTS_MAX_CNT = 50 * 2; const int SET_SPEED_NA = 255;