revert prev. commit + wip fix
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user