Merge pull request #34 from davea/ensure_clean_restarts
Ensure apps call restart_to_default() when finishedandrejusk/bday
commit
b1960d34ae
|
@ -21,3 +21,4 @@ notocall = prompt_text("Number to call:")
|
|||
|
||||
if (notocall):
|
||||
sim800.call(notocall)
|
||||
restart_to_default()
|
||||
|
|
|
@ -47,3 +47,5 @@ while True:
|
|||
notice(message, title=selection["title"])
|
||||
else:
|
||||
break
|
||||
|
||||
restart_to_default()
|
||||
|
|
|
@ -6,11 +6,12 @@ Todo: fix this, it doesn't work at at the moment
|
|||
___name___ = "Synthesizers"
|
||||
___license___ = "MIT"
|
||||
___categories___ = ["Sound"]
|
||||
___dependencies___ = ["speaker", "buttons", "ugfx_helper"]
|
||||
___dependencies___ = ["speaker", "buttons", "ugfx_helper", "app"]
|
||||
|
||||
import ugfx, speaker, ugfx_helper
|
||||
from tilda import Buttons
|
||||
from buttons import *
|
||||
from app import restart_to_default
|
||||
|
||||
ugfx_helper.init()
|
||||
speaker.enabled(True)
|
||||
|
@ -49,3 +50,4 @@ def mode_buttons():
|
|||
speaker.stop()
|
||||
|
||||
mode_buttons() # Todo: Allow different modes and allow users to switch between them via joystick or something
|
||||
restart_to_default()
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
___name___ = "Tilda Torch"
|
||||
___license___ = "MIT"
|
||||
___dependencies___ = ["sleep"]
|
||||
___dependencies___ = ["sleep", "app"]
|
||||
___categories___ = ["EMF"]
|
||||
|
||||
import ugfx, os, time, sleep
|
||||
import ugfx, os, time, sleep, app
|
||||
from tilda import Buttons
|
||||
from machine import Pin
|
||||
|
||||
|
@ -24,3 +24,5 @@ while (not Buttons.is_pressed(Buttons.BTN_A)) and (not Buttons.is_pressed(Button
|
|||
torch.off()
|
||||
|
||||
ugfx.clear()
|
||||
|
||||
app.restart_to_default()
|
||||
|
|
Loading…
Reference in New Issue