Skip to content

Commit 4644c25

Browse files
committed
Fixed drawProgressBar
Changed negative to positive sign at maxProgressWidth
1 parent 9ee8fd2 commit 4644c25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

OLEDDisplay.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ void OLEDDisplay::drawProgressBar(uint16_t x, uint16_t y, uint16_t width, uint16
340340
drawHorizontalLine(xRadius, y + height, width - doubleRadius + 1);
341341
drawCircleQuads(x + width - radius, yRadius, radius, 0b00001001);
342342

343-
uint16_t maxProgressWidth = (width - doubleRadius - 1) * progress / 100;
343+
uint16_t maxProgressWidth = (width - doubleRadius + 1) * progress / 100;
344344

345345
fillCircle(xRadius, yRadius, innerRadius);
346346
fillRect(xRadius + 1, y + 2, maxProgressWidth, height - 3);

0 commit comments

Comments
 (0)