1
0
Fork 0
This commit is contained in:
Samuel Archibald 2020-11-02 23:29:42 -05:00
parent 0e97db1c30
commit c816d9b88e

View file

@ -43,10 +43,9 @@ 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 = batteryController.PercentRemaining();
if(batteryPercent > 100.0f) batteryPercent = 100;
else if(batteryPercent < 0.0f) batteryPercent = 0;
uint8_t brightness = 0;
switch(brightnessController.Level()) {
@ -98,7 +97,7 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen1() {
dateTimeController.Day(), static_cast<uint8_t>(dateTimeController.Month()), dateTimeController.Year(),
dateTimeController.Hours(), dateTimeController.Minutes(), dateTimeController.Seconds(),
uptimeDays, uptimeHours, uptimeMinutes, uptimeSeconds,
batteryPercent, brightness, resetReason);
(int) batteryPercent, brightness, resetReason);
return std::unique_ptr<Screen>(new Screens::Label(app, t1));
}