Skip to content

Commit

Permalink
Merge pull request #16 from pedasmith/Issue15Timeout
Browse files Browse the repository at this point in the history
Fix for issue 15, use the new display.time_to_refresh
  • Loading branch information
tannewt authored Sep 25, 2023
2 parents 8cde429 + f8d114c commit d515fa7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
12 changes: 11 additions & 1 deletion examples/ssd1680_2.13_featherwing.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,14 @@

print("refreshed")

time.sleep(120)
time.sleep(display.time_to_refresh + 5)
# Always refresh a little longer. It's not a problem to refresh
# a few seconds more, but it's terrible to refresh too early
# (the display will throw an exception when if the refresh
# is too soon)
print("waited correct time")


# Keep the display the same
while True:
time.sleep(10)
12 changes: 11 additions & 1 deletion examples/ssd1680_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,14 @@

print("refreshed")

time.sleep(120)
time.sleep(display.time_to_refresh + 5)
# Always refresh a little longer. It's not a problem to refresh
# a few seconds more, but it's terrible to refresh too early
# (the display will throw an exception when if the refresh
# is too soon)
print("waited correct time")


# Keep the display the same
while True:
time.sleep(10)

0 comments on commit d515fa7

Please sign in to comment.