fix display firmware load
+ add remark about test mode in README
This commit is contained in:
12
README.md
12
README.md
@ -145,7 +145,17 @@ which image?
|
|||||||
* remove the stick, power off/on (or do `sudo reboot now`)
|
* 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
|
login with root/FrappyLinse
|
||||||
```
|
```
|
||||||
|
@ -51,9 +51,6 @@ WIDTH = 480
|
|||||||
MAGIC = b'\xcb\xef\x20\x18'
|
MAGIC = b'\xcb\xef\x20\x18'
|
||||||
|
|
||||||
|
|
||||||
mainif = MainIf()
|
|
||||||
|
|
||||||
|
|
||||||
def xy(x, y):
|
def xy(x, y):
|
||||||
x = min(480, int(x))
|
x = min(480, int(x))
|
||||||
return bytes([(min(127, y + TOPGAP) << 1) + (x >> 8), x % 256])
|
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/'):
|
elif tty.startswith('/dev/'):
|
||||||
tty = arg
|
tty = arg
|
||||||
else:
|
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)
|
d = Display(tty, daemon=daemon and not firmware)
|
||||||
if firmware:
|
if firmware:
|
||||||
with open(firmware, 'rb') as f:
|
with open(firmware, 'rb') as f:
|
||||||
|
Reference in New Issue
Block a user