    const float *mpc_y_coords = &scene->mpc_y[0];
  
    bool started = false;
    float off = is_mpc?0.3:0.5;
    float lead_d = scene->lead_d_rel*2.;
    float path_height = is_mpc?(lead_d>5.)?fmin(lead_d, 25.)-fmin(lead_d*0.35, 10.):20.
                              :(lead_d>0.)?fmin(lead_d, 50.)-fmin(lead_d*0.35, 10.):49.;
    pvd->cnt = 0;
    // left side up
    for (int i=0; i<=path_height; i++) {
 
</s> remove 
    auto leaddatad = data.getLeadOne();
    scene.lead_status = leaddatad.getStatus();
    scene.lead_d_rel = leaddatad.getDRel();
    scene.lead_y_rel = leaddatad.getYRel();
    scene.lead_v_rel = leaddatad.getVRel();
    auto leaddatad2 = data.getLeadTwo();
    scene.lead_status2 = leaddatad2.getStatus();
    scene.lead_d_rel2 = leaddatad2.getDRel();
    scene.lead_y_rel2 = leaddatad2.getYRel();
    scene.lead_v_rel2 = leaddatad2.getVRel();
    s->livempc_or_radarstate_changed = true;
 </s> add     scene.lead_data[0] = data.getLeadOne();
    scene.lead_data[1] = data.getLeadTwo(); </s> remove static void draw_lead(UIState *s, float d_rel, float v_rel, float y_rel){
 </s> add static void draw_lead(UIState *s, const cereal::RadarState::LeadData::Reader &lead){ </s> remove   if(s->model_changed) {
 </s> add   if(s->sm->updated("model")) { </s> remove       int volume = fmin(MAX_VOLUME, MIN_VOLUME + s->scene.v_ego / 5);  // up one notch every 5 m/s
 </s> add       int volume = fmin(MAX_VOLUME, MIN_VOLUME + s->scene.controls_state.getVEgo() / 5);  // up one notch every 5 m/s
  float lead_d = scene->lead_data[0].getDRel()*2.;
    const float *mpc_y_coords = &scene->mpc_y[0];
  
    bool started = false;
    float off = is_mpc?0.3:0.5;
  float lead_d = scene->lead_data[0].getDRel()*2.;
    float path_height = is_mpc?(lead_d>5.)?fmin(lead_d, 25.)-fmin(lead_d*0.35, 10.):20.
                              :(lead_d>0.)?fmin(lead_d, 50.)-fmin(lead_d*0.35, 10.):49.;
    pvd->cnt = 0;
    // left side up
    for (int i=0; i<=path_height; i++) {
keep keep keep keep replace keep keep keep keep keep
 ui.cc: remove variables from UIScene, use event::Reader to get data  (#1585)

* use struct to store lead status

* remove white space

* use RadarState::LeadData::Reader

* use reader to get thermal data

* use reader

* continue

* remove variables

reset submodules,fix some errors

reset submodules

revert

* remove s->scene.gps_planner_active

* modify

* cleanup

* done

* resolve conflict

* remove irrelevant comment

* remove white space 
selfdrive/ui/paint.cc