    const int network_img_h = 27;
    const int network_img_w = 176;
    const int network_img_x = !s->scene.uilayout_sidebarcollapsed ? 58 : -(sbr_w);
    const int network_img_y = 196;
    const int img_idx = s->scene.networkType == cereal::ThermalData::NetworkType::NONE ? 0 : network_strength_map[s->scene.networkStrength];
    ui_draw_image(s->vg, network_img_x, network_img_y, network_img_w, network_img_h, s->img_network[img_idx], 1.0f);
  }
  
  static void ui_draw_sidebar_battery_icon(UIState *s) {
    const int battery_img_h = 36;
 
</s> remove   int battery_img = s->scene.batteryCharging ? s->img_battery_charging : s->img_battery;
 </s> add   int battery_img = s->scene.thermal.getBatteryStatus() == "Charging" ? s->img_battery_charging : s->img_battery; </s> remove   const char *network_type = network_type_map[s->scene.networkType];
 </s> add   const char *network_type = network_type_map[s->scene.thermal.getNetworkType()]; </s> remove   const int face_x = (valid_frame_x + face_size + (bdr_s * 2)) + (scene->is_rhd ? valid_frame_w - box_h / 2:0);
  const int face_y = (box_y + box_h - face_size - bdr_s - (bdr_s * 1.5));
  ui_draw_circle_image(s->vg, face_x, face_y, face_size, s->img_face, scene->face_prob > 0.4);
 </s> add   const int x = (valid_frame_x + face_size + (bdr_s * 2)) + (scene->is_rhd ? valid_frame_w - box_h / 2:0);
  const int y = (box_y + box_h - face_size - bdr_s - (bdr_s * 1.5));
  ui_draw_circle_image(s->vg, x, y, face_size, s->img_face, scene->driver_state.getFaceProb() > 0.4); </s> remove   s->model_changed = false;
  s->livempc_or_radarstate_changed = false;

 </s> add  </s> remove                ((battery_img_w - 19) * (s->scene.batteryPercent * 0.01)), battery_img_h - 11, COLOR_WHITE);
 </s> add                ((battery_img_w - 19) * (s->scene.thermal.getBatteryPercent() * 0.01)), battery_img_h - 11, COLOR_WHITE);
  const int img_idx = s->scene.thermal.getNetworkType() == cereal::ThermalData::NetworkType::NONE ? 0 : network_strength_map[s->scene.thermal.getNetworkStrength()];
    const int network_img_h = 27;
    const int network_img_w = 176;
    const int network_img_x = !s->scene.uilayout_sidebarcollapsed ? 58 : -(sbr_w);
    const int network_img_y = 196;
  const int img_idx = s->scene.thermal.getNetworkType() == cereal::ThermalData::NetworkType::NONE ? 0 : network_strength_map[s->scene.thermal.getNetworkStrength()];
    ui_draw_image(s->vg, network_img_x, network_img_y, network_img_w, network_img_h, s->img_network[img_idx], 1.0f);
  }
  
  static void ui_draw_sidebar_battery_icon(UIState *s) {
    const int battery_img_h = 36;
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/sidebar.cc