Merge branch 'hassless-improve-battery-percentage-to-battery-icon-mapping' into develop

This commit is contained in:
Jean-François Milants 2021-08-10 12:31:03 +02:00
commit 707446ed52

View File

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