File tree Expand file tree Collapse file tree
CircuitPython_gifio/PyPortal Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55# Play Multiple GIF files on a PyPortal
66# Requires CircuitPython 8.1.0-beta.1 or later
77# Updated 4/4/2023
8+
9+ import time
10+ import gc
811import os
912import struct
1013import board
1114import gifio
12- import time
1315import adafruit_touchscreen
14- import gc
1516
1617# Get a dictionary of GIF filenames at the passed base directory
1718def get_files (base ):
1819 files = os .listdir (base )
1920 file_names = []
20- for j , filetext in enumerate (files ):
21+ for _ , filetext in enumerate (files ):
2122 if not filetext .startswith ("." ):
2223 if filetext not in ('boot_out.txt' , 'System Volume Information' ):
2324 if filetext .endswith (".gif" ):
@@ -44,7 +45,7 @@ def get_files(base):
4445 # Skip Feather GIFs if put on PyPortal
4546 if odg .width != WIDTH :
4647 print ("File " + files [i ]+ " not right width, skipping\n " )
47- pass
48+ continue
4849
4950 start = time .monotonic ()
5051 next_delay = odg .next_frame () # Load the first frame
You can’t perform that action at this time.
0 commit comments