Skip to content

Commit

Permalink
Linted
Browse files Browse the repository at this point in the history
  • Loading branch information
evaherrada committed May 19, 2021
1 parent 3e51c20 commit 3d78988
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 69 deletions.
17 changes: 8 additions & 9 deletions examples/il0373_1.54_color.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,15 @@

g = displayio.Group()

f = open("/display-ruler.bmp", "rb")
with open("/display-ruler.bmp", "rb") as f:
pic = displayio.OnDiskBitmap(f)
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)

pic = displayio.OnDiskBitmap(f)
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)
display.show(g)

display.show(g)
display.refresh()

display.refresh()
print("refreshed")

print("refreshed")

time.sleep(120)
time.sleep(120)
25 changes: 12 additions & 13 deletions examples/il0373_2.13_color.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,18 @@
g = displayio.Group()

# Display a ruler graphic from the root directory of the CIRCUITPY drive
f = open("/display-ruler.bmp", "rb")
with open("/display-ruler.bmp", "rb") as f:
pic = displayio.OnDiskBitmap(f)
# Create a Tilegrid with the bitmap and put in the displayio group
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)

pic = displayio.OnDiskBitmap(f)
# Create a Tilegrid with the bitmap and put in the displayio group
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)
# Place the display group on the screen
display.show(g)

# Place the display group on the screen
display.show(g)
# Refresh the display to have it actually show the image
# NOTE: Do not refresh eInk displays sooner than 180 seconds
display.refresh()
print("refreshed")

# Refresh the display to have it actually show the image
# NOTE: Do not refresh eInk displays sooner than 180 seconds
display.refresh()
print("refreshed")

time.sleep(180)
time.sleep(180)
25 changes: 12 additions & 13 deletions examples/il0373_2.9_color.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,18 @@
g = displayio.Group()

# Display a ruler graphic from the root directory of the CIRCUITPY drive
f = open("/display-ruler.bmp", "rb")
with open("/display-ruler.bmp", "rb") as f:
pic = displayio.OnDiskBitmap(f)
# Create a Tilegrid with the bitmap and put in the displayio group
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)

pic = displayio.OnDiskBitmap(f)
# Create a Tilegrid with the bitmap and put in the displayio group
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)
# Place the display group on the screen
display.show(g)

# Place the display group on the screen
display.show(g)
# Refresh the display to have it actually show the image
# NOTE: Do not refresh eInk displays sooner than 180 seconds
display.refresh()
print("refreshed")

# Refresh the display to have it actually show the image
# NOTE: Do not refresh eInk displays sooner than 180 seconds
display.refresh()
print("refreshed")

time.sleep(180)
time.sleep(180)
17 changes: 8 additions & 9 deletions examples/il0373_2.9_grayscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,15 @@

g = displayio.Group()

f = open("/display-ruler.bmp", "rb")
with open("/display-ruler.bmp", "rb") as f:
pic = displayio.OnDiskBitmap(f)
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)

pic = displayio.OnDiskBitmap(f)
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)
display.show(g)

display.show(g)
display.refresh()

display.refresh()
print("refreshed")

print("refreshed")

time.sleep(120)
time.sleep(120)
15 changes: 7 additions & 8 deletions examples/il0373_flexible_2.13_monochrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@

g = displayio.Group()

f = open("/display-ruler.bmp", "rb")
with open("/display-ruler.bmp", "rb") as f:
pic = displayio.OnDiskBitmap(f)
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)

pic = displayio.OnDiskBitmap(f)
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)
display.show(g)

display.show(g)
display.refresh()

display.refresh()

time.sleep(120)
time.sleep(120)
15 changes: 7 additions & 8 deletions examples/il0373_flexible_2.9_monochrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@

g = displayio.Group()

f = open("/display-ruler.bmp", "rb")
with open("/display-ruler.bmp", "rb") as f:
pic = displayio.OnDiskBitmap(f)
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)

pic = displayio.OnDiskBitmap(f)
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)
display.show(g)

display.show(g)
display.refresh()

display.refresh()

time.sleep(120)
time.sleep(120)
17 changes: 8 additions & 9 deletions examples/il0373_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,15 @@

g = displayio.Group()

f = open("/display-ruler.bmp", "rb")
with open("/display-ruler.bmp", "rb") as f:
pic = displayio.OnDiskBitmap(f)
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)

pic = displayio.OnDiskBitmap(f)
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
g.append(t)
display.show(g)

display.show(g)
display.refresh()

display.refresh()
print("refreshed")

print("refreshed")

time.sleep(120)
time.sleep(120)

0 comments on commit 3d78988

Please sign in to comment.