revert prev. commit + wip fix

This commit is contained in:
2024-01-15 09:58:03 +01:00
parent ef95e4e383
commit fe1303efdc
2 changed files with 450 additions and 431 deletions

View File

@ -63,18 +63,19 @@ class Display:
self.term = serial.Serial(dev, baudrate=115200, timeout=timeout)
self.storage = bytearray()
if daemon:
text = None
todo_file = STARTUP_TEXT + '.todo'
try:
with open(STARTUP_TEXT) as f:
with open(todo_file) as f:
text = f.read()
print('new startup text:')
print(text)
except FileNotFoundError:
pass
text = None
if text:
self.reset()
self.show(*todo_text.split('\n')[0:3])
self.show(*text.split('\n')[0:3])
self.set_startup()
os.rename(todo_file, STARTUP_TEXT)
else:
self.storage = None
self.gethost(False)