We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ae80514 + bae59ed commit c7c1db3Copy full SHA for c7c1db3
adafruit_slideshow.py
@@ -283,15 +283,15 @@ def advance(self):
283
elif not self.loop:
284
return False
285
else:
286
- image_count = len(self._file_list) - 1
+ image_count = len(self._file_list)
287
if self._current_image < 0:
288
self._current_image += image_count
289
- elif self._current_image > image_count:
+ elif self._current_image >= image_count:
290
self._current_image -= image_count
291
self._reorder_images()
292
293
- imagename = self._file_list[self._current_image]
294
- self._image_file = open(imagename, "rb")
+ image_name = self._file_list[self._current_image]
+ self._image_file = open(image_name, "rb")
295
try:
296
odb = displayio.OnDiskBitmap(self._image_file)
297
except ValueError:
0 commit comments