Skip to content

Commit d515fa7

Browse files
authored
Merge pull request #16 from pedasmith/Issue15Timeout
Fix for issue 15, use the new display.time_to_refresh
2 parents 8cde429 + f8d114c commit d515fa7

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

examples/ssd1680_2.13_featherwing.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,14 @@
5757

5858
print("refreshed")
5959

60-
time.sleep(120)
60+
time.sleep(display.time_to_refresh + 5)
61+
# Always refresh a little longer. It's not a problem to refresh
62+
# a few seconds more, but it's terrible to refresh too early
63+
# (the display will throw an exception when if the refresh
64+
# is too soon)
65+
print("waited correct time")
66+
67+
68+
# Keep the display the same
69+
while True:
70+
time.sleep(10)

examples/ssd1680_simpletest.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,14 @@
6464

6565
print("refreshed")
6666

67-
time.sleep(120)
67+
time.sleep(display.time_to_refresh + 5)
68+
# Always refresh a little longer. It's not a problem to refresh
69+
# a few seconds more, but it's terrible to refresh too early
70+
# (the display will throw an exception when if the refresh
71+
# is too soon)
72+
print("waited correct time")
73+
74+
75+
# Keep the display the same
76+
while True:
77+
time.sleep(10)

0 commit comments

Comments
 (0)