File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77namespace Pinetime {
88 namespace Controllers {
99 // A simple circular buffer that can be used to average
10- // out sensor values
10+ // out the sensor values
1111 template <int N>
1212 class CircBuffer {
1313 public:
Original file line number Diff line number Diff line change 33
44using namespace Pinetime ::Applications::Screens;
55
6- const char * BatteryIcon::GetBatteryIcon (float batteryPercent) {
7- if (batteryPercent > 90 . 0f ) return Symbols::batteryFull;
8- if (batteryPercent > 75 . 0f ) return Symbols::batteryThreeQuarter;
9- if (batteryPercent > 50 . 0f ) return Symbols::batteryHalf;
10- if (batteryPercent > 25 . 0f ) return Symbols::batteryOneQuarter;
6+ const char * BatteryIcon::GetBatteryIcon (int batteryPercent) {
7+ if (batteryPercent > 90 ) return Symbols::batteryFull;
8+ if (batteryPercent > 75 ) return Symbols::batteryThreeQuarter;
9+ if (batteryPercent > 50 ) return Symbols::batteryHalf;
10+ if (batteryPercent > 25 ) return Symbols::batteryOneQuarter;
1111 return Symbols::batteryEmpty;
1212}
1313
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace Pinetime {
66 class BatteryIcon {
77 public:
88 static const char * GetUnknownIcon ();
9- static const char * GetBatteryIcon (float batteryPercent);
9+ static const char * GetBatteryIcon (int batteryPercent);
1010 static const char * GetPlugIcon (bool isCharging);
1111 };
1212 }
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ namespace Pinetime {
6262 Pinetime::Controllers::DateTime::Days currentDayOfWeek = Pinetime::Controllers::DateTime::Days::Unknown;
6363 uint8_t currentDay = 0 ;
6464
65- DirtyValue<float > batteryPercentRemaining {0 };
65+ DirtyValue<int > batteryPercentRemaining {0 };
6666 DirtyValue<bool > bleState {false };
6767 DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>> currentDateTime;
6868 DirtyValue<uint32_t > stepCount {0 };
You can’t perform that action at this time.
0 commit comments