Skip to content

Commit

Permalink
Hide cycles until 0 error resolved (#2367)
Browse files Browse the repository at this point in the history
  • Loading branch information
htotoo authored Nov 19, 2024
1 parent d31857c commit 1fc84e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions firmware/application/apps/ui_battinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void BattinfoView::update_result() {
text_voltage.set("UNKNOWN");
text_current.set("-");
text_charge.set("-");
text_cycles.set("-");
// text_cycles.set("-");
text_ttef.set("-");
text_method.set("-");
text_warn.set("");
Expand Down Expand Up @@ -96,20 +96,20 @@ void BattinfoView::update_result() {
labels_opt.hidden(true);
text_current.hidden(true);
text_charge.hidden(true);
text_cycles.hidden(true);
// text_cycles.hidden(true);
text_ttef.hidden(true);
text_warn.set("");
}
if ((valid_mask & battery::BatteryManagement::BATT_VALID_CYCLES) == battery::BatteryManagement::BATT_VALID_CYCLES) {
text_cycles.hidden(false);
uint16_t cycles = battery::BatteryManagement::get_cycles();
// text_cycles.hidden(false);
uint16_t cycles = 0; // battery::BatteryManagement::get_cycles();
if (cycles < 2)
text_warn.set("SoC improves after 2 cycles");
text_warn.set("SoC improves after each cycles");
else
text_warn.set("");
text_cycles.set(to_string_dec_uint(cycles));
// text_cycles.set(to_string_dec_uint(cycles));
} else {
text_cycles.hidden(true);
// text_cycles.hidden(true);
text_warn.set("");
}
if ((valid_mask & battery::BatteryManagement::BATT_VALID_TTEF) == battery::BatteryManagement::BATT_VALID_TTEF) {
Expand Down Expand Up @@ -160,7 +160,7 @@ BattinfoView::BattinfoView(NavigationView& nav)
&text_method,
&button_mode,
&button_exit,
&text_cycles,
// &text_cycles,
&text_warn,
&text_ttef});

Expand Down
8 changes: 4 additions & 4 deletions firmware/application/apps/ui_battinfo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class BattinfoView : public View {
{{2 * 8, 4 * 16}, "Current:", Theme::getInstance()->fg_light->foreground},
{{2 * 8, 5 * 16}, "Charge:", Theme::getInstance()->fg_light->foreground},
{{2 * 8, 6 * 16}, "TTF/E:", Theme::getInstance()->fg_light->foreground},
{{2 * 8, 7 * 16}, "Cycles:", Theme::getInstance()->fg_light->foreground},
// {{2 * 8, 7 * 16}, "Cycles:", Theme::getInstance()->fg_light->foreground},
{{2 * 8, 10 * 16}, "Change method:", Theme::getInstance()->fg_light->foreground},
};

Expand All @@ -85,12 +85,12 @@ class BattinfoView : public View {
Text text_ttef{
{13 * 8, 6 * 16, 10 * 16, 16},
"-"};
Text text_cycles{
/* Text text_cycles{
{13 * 8, 7 * 16, 10 * 16, 16},
"-"};
"-"}; */

Text text_warn{
{2 * 8, 8 * 16, 30 * 8, 2 * 16},
{1 * 8, 8 * 16, 30 * 8, 2 * 16},
""};

Button button_mode{
Expand Down

0 comments on commit 1fc84e7

Please sign in to comment.