Merge pull request #125 from IoTPanic/patch-menubattery-iotpanic
Fixed battery percentage readout in the menu display
This commit is contained in:
commit
fa4c0d5e3e
|
@ -43,10 +43,7 @@ bool SystemInfo::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
|
|||
}
|
||||
|
||||
std::unique_ptr<Screen> SystemInfo::CreateScreen1() {
|
||||
auto batteryPercentF = batteryController.PercentRemaining();
|
||||
uint16_t batteryPercent = 0;
|
||||
if(batteryPercentF > 100.0f) batteryPercent = 100;
|
||||
else if(batteryPercentF < 0.0f) batteryPercent = 0;
|
||||
auto batteryPercent = static_cast<uint8_t>(batteryController.PercentRemaining());
|
||||
|
||||
uint8_t brightness = 0;
|
||||
switch(brightnessController.Level()) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user