diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index 0b16d633..1cf895c7 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -141,9 +141,6 @@ std::unique_ptr SystemInfo::CreateScreen2() { uptimeSeconds = uptimeSeconds % secondsInAMinute; // TODO handle more than 100 days of uptime - if (batteryPercent == -1) - batteryPercent = 0; - // hack to not use the flot functions from printf uint8_t batteryVoltageBytes[2]; batteryVoltageBytes[1] = static_cast(batteryVoltage); // truncate whole numbers diff --git a/src/drivers/St7789.cpp b/src/drivers/St7789.cpp index 39218e77..0f1dc02e 100644 --- a/src/drivers/St7789.cpp +++ b/src/drivers/St7789.cpp @@ -140,8 +140,9 @@ void St7789::Uninit() { } void St7789::DrawPixel(uint16_t x, uint16_t y, uint32_t color) { - if ((x < 0) || (x >= Width) || (y < 0) || (y >= Height)) + if (x >= Width || y >= Height) { return; + } SetAddrWindow(x, y, x + 1, y + 1);