Skip to content

Commit 68beaea

Browse files
committed
barwidth -> bar_width
1 parent f2ad184 commit 68beaea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/lcd/lcd_comm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def DisplayProgressBar(self, x: int, y: int, width: int, height: int, min_value:
272272

273273
self.DisplayPILImage(bar_image, x, y)
274274

275-
def DisplayRadialProgressBar(self, xc: int, yc: int, radius: int, barwidth: int,
275+
def DisplayRadialProgressBar(self, xc: int, yc: int, radius: int, bar_width: int,
276276
min_value: int = 0,
277277
max_value: int = 100,
278278
angle_start: int = 0,
@@ -303,7 +303,7 @@ def DisplayRadialProgressBar(self, xc: int, yc: int, radius: int, barwidth: int,
303303
assert yc <= self.get_height(), 'Progress bar Y coordinate must be <= display height'
304304
assert xc + radius <= self.get_width(), 'Progress bar width exceeds display width'
305305
assert yc + radius <= self.get_height(), 'Progress bar height exceeds display height'
306-
assert barwidth > 0, 'Progress bar linewidth must be > 0'
306+
assert 0 < bar_width <= radius, 'Progress bar linewidth must be > 0 and <= radius'
307307
assert angle_end % 361 != angle_start % 361, 'Change angles values'
308308

309309
# Don't let the set value exceed our min or max value, this is bad :)
@@ -353,7 +353,7 @@ def DisplayRadialProgressBar(self, xc: int, yc: int, radius: int, barwidth: int,
353353
angleE = angle_start
354354

355355
draw.arc([0, 0, diameter - 1, diameter - 1], angleS, angleE,
356-
fill=bar_color, width=barwidth)
356+
fill=bar_color, width=bar_width)
357357

358358
# Draw text
359359
if with_text:

0 commit comments

Comments
 (0)