Fix boot.py
parent
21560c049e
commit
a0d1d95b45
|
@ -29,6 +29,10 @@ def stop_badge(args, verbose):
|
||||||
pyb = get_pyb(args)
|
pyb = get_pyb(args)
|
||||||
print("Stopping running app:", end="", flush=True)
|
print("Stopping running app:", end="", flush=True)
|
||||||
write_command(pyb, b'\r\x03\x03') # ctrl-C twice: interrupt any running program
|
write_command(pyb, b'\r\x03\x03') # ctrl-C twice: interrupt any running program
|
||||||
|
n = pyb.serial.inWaiting()
|
||||||
|
while n > 0:
|
||||||
|
pyb.serial.read(n)
|
||||||
|
n = pyb.serial.inWaiting()
|
||||||
print(" DONE")
|
print(" DONE")
|
||||||
|
|
||||||
def write_command(pyb, command):
|
def write_command(pyb, command):
|
||||||
|
|
2
boot.py
2
boot.py
|
@ -30,6 +30,8 @@ else:
|
||||||
if "main.py" in root:
|
if "main.py" in root:
|
||||||
start = "main.py"
|
start = "main.py"
|
||||||
start = start or file("once.txt", True) or file("default_app.txt", False) or any_home() or "bootstrap.py"
|
start = start or file("once.txt", True) or file("default_app.txt", False) or any_home() or "bootstrap.py"
|
||||||
|
if ".py" not in start:
|
||||||
|
start += "/main.py"
|
||||||
print("Booting into %s" % start)
|
print("Booting into %s" % start)
|
||||||
tilda.main(start)
|
tilda.main(start)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue