fix display firmware load

+ add remark about test mode in README
This commit is contained in:
2024-03-20 13:46:56 +01:00
parent c0983be282
commit de521a06df
2 changed files with 15 additions and 5 deletions

View File

@ -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
```

View File

@ -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: