From 4644c25bf5407c0fba272e9f5e5f131e9968ceae Mon Sep 17 00:00:00 2001 From: Alberto Mora <moracabanas@live.com> Date: Tue, 27 Feb 2018 21:48:33 +0100 Subject: [PATCH] Fixed drawProgressBar Changed negative to positive sign at maxProgressWidth --- OLEDDisplay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OLEDDisplay.cpp b/OLEDDisplay.cpp index f8fc226..eecb13b 100644 --- a/OLEDDisplay.cpp +++ b/OLEDDisplay.cpp @@ -340,7 +340,7 @@ void OLEDDisplay::drawProgressBar(uint16_t x, uint16_t y, uint16_t width, uint16 drawHorizontalLine(xRadius, y + height, width - doubleRadius + 1); drawCircleQuads(x + width - radius, yRadius, radius, 0b00001001); - uint16_t maxProgressWidth = (width - doubleRadius - 1) * progress / 100; + uint16_t maxProgressWidth = (width - doubleRadius + 1) * progress / 100; fillCircle(xRadius, yRadius, innerRadius); fillRect(xRadius + 1, y + 2, maxProgressWidth, height - 3); -- GitLab