    }
    if (sm.updated("dMonitoringState")) {
      auto data = sm["dMonitoringState"].getDMonitoringState();
      scene.is_rhd = data.getIsRHD();
      scene.awareness_status = data.getAwarenessStatus();
      s->preview_started = data.getIsPreview();
    }
  
    s->started = s->thermal_started || s->preview_started ;
    // Handle onroad/offroad transition
 
</s> remove   s->started = s->thermal_started || s->preview_started ;
 </s> add   s->started = scene.thermal.getStarted() || s->preview_started ; </s> remove     auto data = sm["driverState"].getDriverState();
    scene.face_prob = data.getFaceProb();
    auto fxy_list = data.getFacePosition();
    scene.face_x = fxy_list[0];
    scene.face_y = fxy_list[1];
 </s> add     scene.driver_state = sm["driverState"].getDriverState(); </s> remove     auto data = sm["thermal"].getThermal();
    scene.networkType = data.getNetworkType();
    scene.networkStrength = data.getNetworkStrength();
    scene.batteryPercent = data.getBatteryPercent();
    scene.batteryCharging = data.getBatteryStatus() == "Charging";
    scene.freeSpace = data.getFreeSpace();
    scene.thermalStatus = data.getThermalStatus();
    scene.paTemp = data.getPa0();

    s->thermal_started = data.getStarted();
 </s> add     scene.thermal = sm["thermal"].getThermal(); </s> remove     s->model_changed = true;
 </s> add  </s> remove     if (data.getMockEngaged() != scene.uilayout_mockengaged) {
      scene.uilayout_mockengaged = data.getMockEngaged();
    }
 </s> add 
    }
    if (sm.updated("dMonitoringState")) {
      auto data = sm["dMonitoringState"].getDMonitoringState();
      scene.is_rhd = data.getIsRHD();

      s->preview_started = data.getIsPreview();
    }
  
    s->started = s->thermal_started || s->preview_started ;
    // Handle onroad/offroad transition
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