mark1/fix display big images

https://github.com/MycroftAI/enclosure-mark1/blob/master/protocols.txt#L141

according to the spec there is a bug
pull/2429/head
JarbasAI 2019-12-17 01:34:08 +00:00 committed by GitHub
parent bbb5fe7c6a
commit 46af6fcff2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -108,11 +108,8 @@ class EnclosureMouth:
message = "mouth.icon=" + x_offset + y_offset + clear_previous + code
# Check if message exceeds Arduino's serial buffer input limit 64 bytes
if len(message) > 60:
message1 = message[:31]
message2 = message[31:]
message1 += "$"
message2 += "$"
message2 = "mouth.icon=" + message2
message1 = message[:31] + "$"
message2 = "mouth.icon=$" + message[31:]
self.writer.write(message1)
time.sleep(0.25) # writer bugs out if sending messages too rapidly
self.writer.write(message2)