File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
CircuitPython_gifio/PyPortal Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 5
5
# Play Multiple GIF files on a PyPortal
6
6
# Requires CircuitPython 8.1.0-beta.1 or later
7
7
# Updated 4/4/2023
8
+
9
+ import time
10
+ import gc
8
11
import os
9
12
import struct
10
13
import board
11
14
import gifio
12
- import time
13
15
import adafruit_touchscreen
14
- import gc
15
16
16
17
# Get a dictionary of GIF filenames at the passed base directory
17
18
def get_files (base ):
18
19
files = os .listdir (base )
19
20
file_names = []
20
- for j , filetext in enumerate (files ):
21
+ for _ , filetext in enumerate (files ):
21
22
if not filetext .startswith ("." ):
22
23
if filetext not in ('boot_out.txt' , 'System Volume Information' ):
23
24
if filetext .endswith (".gif" ):
@@ -44,7 +45,7 @@ def get_files(base):
44
45
# Skip Feather GIFs if put on PyPortal
45
46
if odg .width != WIDTH :
46
47
print ("File " + files [i ]+ " not right width, skipping\n " )
47
- pass
48
+ continue
48
49
49
50
start = time .monotonic ()
50
51
next_delay = odg .next_frame () # Load the first frame
You can’t perform that action at this time.
0 commit comments