Fix for comments on issue #125, bounds check removed
This commit is contained in:
parent
c816d9b88e
commit
600dbb0280
|
@ -43,9 +43,7 @@ bool SystemInfo::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<Screen> SystemInfo::CreateScreen1() {
|
std::unique_ptr<Screen> SystemInfo::CreateScreen1() {
|
||||||
auto batteryPercent = batteryController.PercentRemaining();
|
int8_t batteryPercent = (int)batteryController.PercentRemaining();
|
||||||
if(batteryPercent > 100.0f) batteryPercent = 100;
|
|
||||||
else if(batteryPercent < 0.0f) batteryPercent = 0;
|
|
||||||
|
|
||||||
uint8_t brightness = 0;
|
uint8_t brightness = 0;
|
||||||
switch(brightnessController.Level()) {
|
switch(brightnessController.Level()) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user