We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74a49da commit ac169f3Copy full SHA for ac169f3
library/lcd/lcd_comm.py
@@ -19,6 +19,7 @@
19
import copy
20
import math
21
import os
22
+import platform
23
import queue
24
import sys
25
import threading
@@ -139,6 +140,10 @@ def SendLine(self, line: bytes):
139
140
def WriteLine(self, line: bytes):
141
try:
142
self.serial_write(line)
143
+ if platform.system() == "Darwin":
144
+ # macOS needs the serial buffer to be flushed regularly to avoid bitmap corruption on the display
145
+ # See https://github.com/mathoudebine/turing-smart-screen-python/issues/7
146
+ self.lcd_serial.flush()
147
except serial.SerialTimeoutException:
148
# We timed-out trying to write to our device, slow things down.
149
logger.warning("(Write line) Too fast! Slow down!")
0 commit comments