Skip to content

Commit 8593c16

Browse files
committed
enlinten
1 parent df22e21 commit 8593c16

File tree

1 file changed

+6
-6
lines changed
  • PyPortal/PyPortal_Wheres_My_Friend

1 file changed

+6
-6
lines changed

PyPortal/PyPortal_Wheres_My_Friend/code.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
IMAGE_SPRITE_X = (display.width // 3) - 10
3636
IMAGE_SPRITE_Y = display.height // 5
3737

38-
# Create a displayIO Group
38+
# Create a displayIO Group
3939
group = displayio.Group()
4040

4141
# Draw the background
@@ -66,19 +66,19 @@
6666
# Show the group
6767
display.root_group = group
6868

69-
def set_image(group, filename):
69+
def set_image(image_group, filename):
7070
"""Sets the image file for a given group for display."""
7171
print(f"Set image to {filename}")
72-
if group:
73-
group.pop()
72+
if image_group:
73+
image_group.pop()
7474

7575
image_file = open(filename, "rb")
7676
image = displayio.OnDiskBitmap(image_file)
7777
image_sprite = displayio.TileGrid(image,
7878
pixel_shader=getattr(image, 'pixel_shader', displayio.ColorConverter()))
7979
image_sprite.x = IMAGE_SPRITE_X
8080
image_sprite.y = IMAGE_SPRITE_Y
81-
group.append(image_sprite)
81+
image_group.append(image_sprite)
8282

8383
prv_location = None
8484
while True:
@@ -105,7 +105,7 @@ def set_image(group, filename):
105105
else:
106106
print("Location not found in images!")
107107
# Update the location text
108-
text_area_location.text=f"Error: Unknown Value!"
108+
text_area_location.text="Error: Unknown Value!"
109109
# Show the refreshed group
110110
display.root_group = group
111111
except RuntimeError as e:

0 commit comments

Comments
 (0)