From e9415827b7ecb28de3daf319fb5ad5acdf4fcaac Mon Sep 17 00:00:00 2001 From: mallyhubz Date: Thu, 6 Sep 2018 01:00:33 +0100 Subject: [PATCH] fixed menu long press --- cmd.exe.lnk | Bin 1244 -> 1288 bytes nyan_home/main.py | 28 ++-------------------------- tilda_tools.bat | 2 +- 3 files changed, 3 insertions(+), 27 deletions(-) diff --git a/cmd.exe.lnk b/cmd.exe.lnk index e92d25531ab9d5e78e8d3e0fc585195c7c308948..277074e49b1870c03e08bb74c2c8b11de9b7f2a2 100644 GIT binary patch delta 93 zcmcb^*}*kIgmLyp(H)F}iVS){7=s`uC$SitN-;PySOG;t8HyQF8H#{p3_~tMB0~;? i0z(EvDMJ!N6;Q;NA)CR3L6^aip#TVrH%l=cVgdk!I1;7+ delta 95 zcmeC+y2Cj^gmLml(H)GwY7D*%Rtzx=u0YxiNc%EmGng>wGB`360AVqZmCKL_q)Ql5 O8HxzWZ+2rk!~_7rdJ~`k diff --git a/nyan_home/main.py b/nyan_home/main.py index 04e808f..f52d216 100644 --- a/nyan_home/main.py +++ b/nyan_home/main.py @@ -44,25 +44,7 @@ ugfx.clear() ugfx.orientation(180) force_backlight() -Buttons.enable_interrupt( - Buttons.BTN_A, - cbButtonA, - on_press=True, - on_release=False); -Buttons.enable_interrupt( - Buttons.BTN_B, - cbButtonB, - on_press=True, - on_release=False); - -def cbButtonA(button_id): - global bkl - bkl = True - -def cbButtonB(button_id): - global ext - ext = False #everything from here onwards is unknown # Colour stuff @@ -93,12 +75,6 @@ while True: i = i + 1 if i > 11: i = 0 + sleep_or_exit(0.5) - if bkl: - force_backlight() - continue - - if ext: - break - -machine.reset() \ No newline at end of file +app.restart_to_default() \ No newline at end of file diff --git a/tilda_tools.bat b/tilda_tools.bat index 0d0e351..76c731f 100644 --- a/tilda_tools.bat +++ b/tilda_tools.bat @@ -1,2 +1,2 @@ @echo off -python %CD%/.development\tilda_tools.py %* \ No newline at end of file +python "%CD%/.development\tilda_tools.py" %* \ No newline at end of file