diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-10-12 11:51:14 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-10-12 11:51:14 +1100 |
| commit | 53cf476876560723031128a0f1b47135de7167d1 (patch) | |
| tree | 9331625a9b83d047318d22cb2a33bb86d3f3fef0 /src/ui/widget_top_bar.cpp | |
| parent | 936e327974c14fdd803d164b8e75b1e02e53ba4f (diff) | |
| download | tangara-fw-53cf476876560723031128a0f1b47135de7167d1.tar.gz | |
Remove mV from top bar, now that we know it's not the issue
Diffstat (limited to 'src/ui/widget_top_bar.cpp')
| -rw-r--r-- | src/ui/widget_top_bar.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ui/widget_top_bar.cpp b/src/ui/widget_top_bar.cpp index d13df9db..36ee65c0 100644 --- a/src/ui/widget_top_bar.cpp +++ b/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); |
