Update BatteryIcon.cpp

Improvement to the mapping of battery percentage to the battery icon to be displayed.
This commit is contained in:
hassless
2021-06-09 13:47:22 +02:00
committed by GitHub
parent 79f0fcb07a
commit d0df278b0b

View File

@@ -4,13 +4,13 @@
using namespace Pinetime::Applications::Screens;
const char* BatteryIcon::GetBatteryIcon(int batteryPercent) {
if (batteryPercent > 90)
if (batteryPercent > 87)
return Symbols::batteryFull;
if (batteryPercent > 75)
if (batteryPercent > 62)
return Symbols::batteryThreeQuarter;
if (batteryPercent > 50)
if (batteryPercent > 37)
return Symbols::batteryHalf;
if (batteryPercent > 25)
if (batteryPercent > 12)
return Symbols::batteryOneQuarter;
return Symbols::batteryEmpty;
}