Fix for comments on issue #125, bounds check removed

This commit is contained in:
Samuel Archibald 2020-11-16 09:43:32 -05:00
parent c816d9b88e
commit 600dbb0280

View file

@ -43,9 +43,7 @@ bool SystemInfo::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
}
std::unique_ptr<Screen> SystemInfo::CreateScreen1() {
auto batteryPercent = batteryController.PercentRemaining();
if(batteryPercent > 100.0f) batteryPercent = 100;
else if(batteryPercent < 0.0f) batteryPercent = 0;
int8_t batteryPercent = (int)batteryController.PercentRemaining();
uint8_t brightness = 0;
switch(brightnessController.Level()) {