Add reboot at the end of pair.py

This commit is contained in:
Viktor Dragomiretskyy 2020-07-09 09:22:49 +12:00
parent 086b9e9b6c
commit 38ccc1e5a7

View file

@ -7,7 +7,7 @@ from proto9x.flash import read_tls_flash
from proto9x.init_flash import init_flash from proto9x.init_flash import init_flash
from proto9x.upload_fwext import upload_fwext from proto9x.upload_fwext import upload_fwext
from proto9x.init_db import init_db from proto9x.init_db import init_db
from proto9x.sensor import sensor from proto9x.sensor import sensor, reboot
#usb.trace_enabled=True #usb.trace_enabled=True
#tls.trace_enabled=True #tls.trace_enabled=True
@ -21,6 +21,7 @@ def restart():
tls.parseTlsFlash(read_tls_flash()) tls.parseTlsFlash(read_tls_flash())
tls.open() tls.open()
try:
usb.open() usb.open()
print('Initializing flash...') print('Initializing flash...')
init_flash() init_flash()
@ -38,3 +39,6 @@ print('Init database...')
init_db() init_db()
print('That\'s it, pairing\'s finished') print('That\'s it, pairing\'s finished')
finally:
sleep(1)
reboot()