paint.cc: remove redundant calls (#2025)
* remove redundant calls * set MODEL_LANE_PATH_CNT=2
This commit is contained in:
parent
934506e154
commit
fe43d51686
|
@ -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) {
|
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);
|
update_lane_line_data(s, path.points, 0.025*path.prob, pstart, path.validLen);
|
||||||
float var = fmin(path.std, 0.7);
|
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 + 1, path.validLen);
|
||||||
update_lane_line_data(s, path.points, var, pstart + 2, path.validLen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ui_draw_lane(UIState *s, const PathData *path, model_path_vertices_data *pstart, NVGcolor color) {
|
static void ui_draw_lane(UIState *s, const PathData *path, model_path_vertices_data *pstart, NVGcolor color) {
|
||||||
ui_draw_lane_line(s, pstart, color);
|
ui_draw_lane_line(s, pstart, color);
|
||||||
color.a /= 25;
|
color.a /= 25;
|
||||||
ui_draw_lane_line(s, pstart + 1, color);
|
ui_draw_lane_line(s, pstart + 1, color);
|
||||||
ui_draw_lane_line(s, pstart + 2, color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ui_draw_vision_lanes(UIState *s) {
|
static void ui_draw_vision_lanes(UIState *s) {
|
||||||
|
|
|
@ -75,7 +75,7 @@ const int home_btn_y = vwp_h - home_btn_h - 40;
|
||||||
const int UI_FREQ = 30; // Hz
|
const int UI_FREQ = 30; // Hz
|
||||||
|
|
||||||
const int MODEL_PATH_MAX_VERTICES_CNT = 98;
|
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 TRACK_POINTS_MAX_CNT = 50 * 2;
|
||||||
|
|
||||||
const int SET_SPEED_NA = 255;
|
const int SET_SPEED_NA = 255;
|
||||||
|
|
Loading…
Reference in a new issue