Skip to content

Commit 6172c7a

Browse files
authored
Update code.py
1 parent c5caa75 commit 6172c7a

File tree

1 file changed

+4
-4
lines changed
  • PyPortal_Floppy_with_Display

1 file changed

+4
-4
lines changed

PyPortal_Floppy_with_Display/code.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def get_files(base):
3030
file_names.append((filetext, True))
3131
else:
3232
file_names.append((filetext, False))
33+
j = 0
3334
return filenames
3435

3536
def get_touch(screen):
@@ -152,11 +153,11 @@ def get_touch(screen):
152153
else:
153154
# Blank out more and extra icon spaces
154155
moresprite[0] = BLANK
155-
if PAGE > 1: # Need to display the less than touch sprite
156+
if PAGE > 1: # Need to display the less than touch sprite
156157
lesssprite[0] = LEFT
157158
else:
158159
lesssprite[0] = BLANK
159-
160+
160161
# Time to check for user touch of screen (BLOCKING)
161162
touch_x = get_touch(ts)
162163
print("Touch Registered ")
@@ -189,7 +190,7 @@ def get_touch(screen):
189190
else:
190191
currentfile += 1 # Increment file counter
191192
spot += 1 # Increment icon space counter
192-
if spot == PAGEMAXFILES: # Last page ended with
193+
if spot == PAGEMAXFILES: # Last page ended with
193194
print("hit")
194195
# calculate next icon location
195196
if spot % ICONSACROSS: # not at end of icon row
@@ -204,4 +205,3 @@ def get_touch(screen):
204205
sprites[i][0] = BLANK
205206
labels[i].text = " "
206207
# End while
207-

0 commit comments

Comments
 (0)