This commit is contained in:
redfast00 2020-03-10 03:22:44 +01:00
parent c0931a8087
commit ce24054458
No known key found for this signature in database
GPG key ID: 5946E0E34FD0553C

View file

@ -9,6 +9,7 @@ import string
import base64 import base64
from queue import Queue from queue import Queue
from threading import Thread from threading import Thread
import subprocess
NULL_CHAR = chr(0) NULL_CHAR = chr(0)
@ -158,6 +159,9 @@ def message_collector(messagequeue):
keyboard.printstring('\n' * 32) keyboard.printstring('\n' * 32)
else: else:
keyboard.printstring(message + '\n') keyboard.printstring(message + '\n')
args = [str(ord(s)) for s in message if 0 < ord(s) < 255][:20]
subprocess.run(["i2cset", "-y", "1", "8", "0"] + args + ['i'])
time.sleep(int(len(args) * 1.5))
keyboard.reset_color() keyboard.reset_color()
keyboard.file.flush() keyboard.file.flush()
if messagequeue.empty(): if messagequeue.empty():