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