Bricking the device with long messages

Hello Jürgen, I had a problem with long text messages. 
When sending more than 8192 bytes, the message(s) will be displayed, but after turning of it never starts again. So I lost 4 badges.
Greetings Klaus
pull/1/head
syspart 5 years ago committed by GitHub
parent 11febb93a7
commit d643393f55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      led-badge-11x44.py

@ -463,6 +463,10 @@ if needpadding:
# print(buf) # array('B', [119, 97, 110, 103, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 126, 255, 255, 255, 255, 126, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
if len(buf) > 8192:
print ("Writing more than 8192 bytes damages the display!")
sys.exit(1)
if have_pyhidapi:
pyhidapi.hid_write(dev, buf)
else:

Loading…
Cancel
Save