diff options
| author | The King <27705324+jlukanc1@users.noreply.github.com> | 2021-01-24 21:01:14 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-24 21:01:14 (GMT) |
| commit | 8c3df5f0211e0cc31de90039a73fe48b9a9aafe0 (patch) | |
| tree | 88fc0671a629b27793a418df76f543c7913b644a /src/displayapp/screens/BatteryIcon.cpp | |
| parent | 51c8cadcb78bdbe9013f5aace629c96ed3dfd06f (diff) | |
| parent | 80838d1e42e83b50188d6237d16c81cfa27781a6 (diff) | |
Merge branch 'develop' into upstream-dev
Diffstat (limited to 'src/displayapp/screens/BatteryIcon.cpp')
| -rw-r--r-- | src/displayapp/screens/BatteryIcon.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/displayapp/screens/BatteryIcon.cpp b/src/displayapp/screens/BatteryIcon.cpp index 4c10247..455b0c6 100644 --- a/src/displayapp/screens/BatteryIcon.cpp +++ b/src/displayapp/screens/BatteryIcon.cpp @@ -3,11 +3,11 @@ using namespace Pinetime::Applications::Screens; -const char* BatteryIcon::GetBatteryIcon(float batteryPercent) { - if(batteryPercent > 90.0f) return Symbols::batteryFull; - if(batteryPercent > 75.0f) return Symbols::batteryThreeQuarter; - if(batteryPercent > 50.0f) return Symbols::batteryHalf; - if(batteryPercent > 25.0f) return Symbols::batteryOneQuarter; +const char* BatteryIcon::GetBatteryIcon(int batteryPercent) { + if(batteryPercent > 90) return Symbols::batteryFull; + if(batteryPercent > 75) return Symbols::batteryThreeQuarter; + if(batteryPercent > 50) return Symbols::batteryHalf; + if(batteryPercent > 25) return Symbols::batteryOneQuarter; return Symbols::batteryEmpty; } |
