From de521a06df7836150ec90afbf811b65748d25a55 Mon Sep 17 00:00:00 2001 From: l_samenv Date: Wed, 20 Mar 2024 13:46:56 +0100 Subject: [PATCH] fix display firmware load + add remark about test mode in README --- README.md | 12 +++++++++++- display.py | 8 ++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 63ab53d..f0991d2 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,17 @@ which image? * remove the stick, power off/on (or do `sudo reboot now`) -### e) Install Services +### e) Install Display Firmware (control box only) + +display in test mode? +- finish it by touching several times + +> cd boxtools +> git pull +> sudo python3 display.py fw_display.bin + + +### f) Install Services login with root/FrappyLinse ``` diff --git a/display.py b/display.py index 3af4ddd..39db6d3 100644 --- a/display.py +++ b/display.py @@ -51,9 +51,6 @@ WIDTH = 480 MAGIC = b'\xcb\xef\x20\x18' -mainif = MainIf() - - def xy(x, y): x = min(480, int(x)) return bytes([(min(127, y + TOPGAP) << 1) + (x >> 8), x % 256]) @@ -266,9 +263,12 @@ for arg in sys.argv[1:]: elif tty.startswith('/dev/'): tty = arg else: - raise ValueError(f'do not know how to tread argument: {arg}') + raise ValueError(f'do not know how to treat argument: {arg}') +if not firmware: + mainif = MainIf() + d = Display(tty, daemon=daemon and not firmware) if firmware: with open(firmware, 'rb') as f: