Converted all the other float usage to int.
This commit is contained in:
parent
e2d1f81915
commit
271ca78be5
|
@ -7,7 +7,7 @@
|
|||
namespace Pinetime {
|
||||
namespace Controllers {
|
||||
// A simple circular buffer that can be used to average
|
||||
// out sensor values
|
||||
// out the sensor values
|
||||
template <int N>
|
||||
class CircBuffer {
|
||||
public:
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Pinetime {
|
|||
class BatteryIcon {
|
||||
public:
|
||||
static const char* GetUnknownIcon();
|
||||
static const char* GetBatteryIcon(float batteryPercent);
|
||||
static const char* GetBatteryIcon(int batteryPercent);
|
||||
static const char* GetPlugIcon(bool isCharging);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace Pinetime {
|
|||
Pinetime::Controllers::DateTime::Days currentDayOfWeek = Pinetime::Controllers::DateTime::Days::Unknown;
|
||||
uint8_t currentDay = 0;
|
||||
|
||||
DirtyValue<float> batteryPercentRemaining {0};
|
||||
DirtyValue<int> batteryPercentRemaining {0};
|
||||
DirtyValue<bool> bleState {false};
|
||||
DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>> currentDateTime;
|
||||
DirtyValue<uint32_t> stepCount {0};
|
||||
|
|
Loading…
Reference in New Issue
Block a user