  void handle_message(UIState *s, SubMaster &sm) {
    UIScene &scene = s->scene;
    if (s->started && sm.updated("controlsState")) {
      auto event = sm["controlsState"];
      auto data = event.getControlsState();
      s->controls_timeout = 1 * UI_FREQ;
      scene.frontview = data.getRearViewCam();
      if (!scene.frontview){ s->controls_seen = true; }
  
      if (data.getVCruise() != scene.v_cruise) {
 
</s> remove     scene.frontview = data.getRearViewCam();
 </s> add     scene.frontview = scene.controls_state.getRearViewCam(); </s> remove     if (data.getVCruise() != scene.v_cruise) {
      scene.v_cruise_update_ts = event.getLogMonoTime();
    }
    scene.v_cruise = data.getVCruise();
    scene.v_ego = data.getVEgo();
    scene.curvature = data.getCurvature();
    scene.engaged = data.getEnabled();
    scene.engageable = data.getEngageable();
    scene.gps_planner_active = data.getGpsPlannerActive();
    scene.monitoring_active = data.getDriverMonitoringOn();
    scene.decel_for_model = data.getDecelForModel();
    auto alert_sound = data.getAlertSound();
 </s> add     auto alert_sound = scene.controls_state.getAlertSound(); </s> remove     s->model_changed = true;
 </s> add  </s> remove     if (data.getMockEngaged() != scene.uilayout_mockengaged) {
      scene.uilayout_mockengaged = data.getMockEngaged();
    }
 </s> add  </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();
    scene.controls_state = event.getControlsState();
  void handle_message(UIState *s, SubMaster &sm) {
    UIScene &scene = s->scene;
    if (s->started && sm.updated("controlsState")) {
      auto event = sm["controlsState"];
    scene.controls_state = event.getControlsState();
      s->controls_timeout = 1 * UI_FREQ;
      scene.frontview = data.getRearViewCam();
      if (!scene.frontview){ s->controls_seen = true; }
  
      if (data.getVCruise() != scene.v_cruise) {
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/ui.cc