Remove mV from top bar, now that we know it's not the issue

custom
jacqueline 2 years ago
parent 936e327974
commit 53cf476876
  1. 8
      src/ui/widget_top_bar.cpp

@ -85,13 +85,11 @@ TopBar::TopBar(lv_obj_t* parent,
bindings_.push_back(model.battery_state.onChangedAndNow(
[=](const battery::Battery::BatteryState& state) {
std::ostringstream voltage;
voltage << (state.millivolts / 1000) << "."
<< (state.millivolts / 100 % 10) << "V";
if (state.is_charging) {
voltage << "+";
lv_label_set_text(charging, "+");
} else {
lv_label_set_text(charging, "");
}
lv_label_set_text(charging, voltage.str().c_str());
if (state.percent >= 95) {
lv_img_set_src(battery, &kIconBatteryFull);

Loading…
Cancel
Save