File tree Expand file tree Collapse file tree
CircuitPython_gifio/Feather Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55# Play Multiple GIF files on a n ESP32-S2 Feather TFT
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
1215import digitalio
13- import time
14- import gc
1516
1617# Get a dictionary of GIF filenames at the passed base directory
1718def get_files (base ):
18- files = os .listdir (base )
19+ allfiles = os .listdir (base )
1920 file_names = []
20- for j , filetext in enumerate (files ):
21+ for _ , filetext in enumerate (allfiles ):
2122 if not filetext .startswith ("." ):
2223 if filetext not in ('boot_out.txt' , 'System Volume Information' ):
2324 if filetext .endswith (".gif" ):
@@ -41,7 +42,7 @@ def get_files(base):
4142 # Skip PyPortal GIFs if put on ESP32-S2 Feather TFT
4243 if odg .width != board .DISPLAY .width :
4344 print ("File " + files [i ]+ " not right width, skipping\n " )
44- pass
45+ continue
4546
4647 start = time .monotonic ()
4748 next_delay = odg .next_frame () # Load the first frame
You can’t perform that action at this time.
0 commit comments