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