From 271ca78be55e2330b88bec90c7fe8f7a2e27bc87 Mon Sep 17 00:00:00 2001 From: panky-codes Date: Sat, 16 Jan 2021 20:18:55 +0100 Subject: Converted all the other float usage to int. --- src/displayapp/screens/BatteryIcon.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/displayapp/screens/BatteryIcon.cpp') diff --git a/src/displayapp/screens/BatteryIcon.cpp b/src/displayapp/screens/BatteryIcon.cpp index 4c102477..455b0c6d 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; } -- cgit v1.2.3-70-g09d2