  static void ui_draw_vision_lanes(UIState *s) {
    const UIScene *scene = &s->scene;
    model_path_vertices_data *pvd = &s->model_path_vertices[0];
    if(s->sm->updated("model")) {
      update_all_lane_lines_data(s, scene->model.left_lane, pvd);
      update_all_lane_lines_data(s, scene->model.right_lane, pvd + MODEL_LANE_PATH_CNT);
    }
    // Draw left lane edge
    ui_draw_lane(
        s, &scene->model.left_lane,
        pvd,
 
</s> remove       s, &scene->model.left_lane,
      pvd,
      nvgRGBAf(1.0, 1.0, 1.0, scene->model.left_lane.prob));
 </s> add       s, pvd,
      nvgRGBAf(1.0, 1.0, 1.0, scene->model.getLeftLane().getProb())); </s> remove       s, &scene->model.right_lane,
      pvd + MODEL_LANE_PATH_CNT,
      nvgRGBAf(1.0, 1.0, 1.0, scene->model.right_lane.prob));
 </s> add       s, pvd + MODEL_LANE_PATH_CNT,
      nvgRGBAf(1.0, 1.0, 1.0, scene->model.getRightLane().getProb())); </s> remove 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);
 </s> add static void update_all_lane_lines_data(UIState *s, const cereal::ModelData::PathData::Reader &path, const float *points, model_path_vertices_data *pstart) {
  update_lane_line_data(s, points, 0.025*path.getProb(), pstart, path.getValidLen());
  update_lane_line_data(s, points, fmin(path.getStd(), 0.7), pstart + 1, path.getValidLen()); </s> remove static void ui_draw_lane(UIState *s, const PathData *path, model_path_vertices_data *pstart, NVGcolor color) {
 </s> add static void ui_draw_lane(UIState *s,  model_path_vertices_data *pstart, NVGcolor color) {
    update_all_lane_lines_data(s, scene->model.getLeftLane(), scene->left_lane_points, pvd);
    update_all_lane_lines_data(s, scene->model.getRightLane(), scene->right_lane_points, pvd + MODEL_LANE_PATH_CNT);
  static void ui_draw_vision_lanes(UIState *s) {
    const UIScene *scene = &s->scene;
    model_path_vertices_data *pvd = &s->model_path_vertices[0];
    if(s->sm->updated("model")) {
    update_all_lane_lines_data(s, scene->model.getLeftLane(), scene->left_lane_points, pvd);
    update_all_lane_lines_data(s, scene->model.getRightLane(), scene->right_lane_points, pvd + MODEL_LANE_PATH_CNT);
    update_all_lane_lines_data(s, scene->model.getLeftLane(), scene->left_lane_points, pvd);
    update_all_lane_lines_data(s, scene->model.getRightLane(), scene->right_lane_points, pvd + MODEL_LANE_PATH_CNT);
    }
    // Draw left lane edge
    ui_draw_lane(
        s, &scene->model.left_lane,
        pvd,
keep keep keep keep replace replace keep keep keep keep keep
 ui: refactor model related functions (#2026)

* remove read_model

* remove structs for c-capnp

* remove duplicate #define from modeld

* add function fill_path_points

* fix Indentation

* use MODEL_PATH_DISTANCE instead of 192

* fix type

use validLen

* rename left_path_points&right_path_points to xxx_lane_points 
selfdrive/ui/paint.cc