commit 4fa2f4c0760d1140d9106de61eb04f23ef34c2d3
parent 1d36681129f22c3fc6219887f66ae9eb9d9790bd
Author: rbckman <rob@tarina.org>
Date: Sat, 23 Mar 2024 14:30:03 +0000
1s usb search
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/VERSION b/VERSION
@@ -1,2 +1,2 @@
-1.49
+1.50
Jackson
diff --git a/gonzopi.py b/gonzopi.py
@@ -4452,12 +4452,12 @@ def usbfilmfolder():
holdbutton = ''
writemessage('Searching for usb storage device, middlebutton to cancel')
usbmount = 0
+ waiting = time.time()
while True:
pressed, buttonpressed, buttontime, holdbutton, event, keydelay = getbutton(pressed, buttonpressed, buttontime, holdbutton)
usbconnected = os.path.ismount('/media/usb'+str(usbmount))
- if pressed == 'middle':
+ if pressed == 'middle' or time.time() - waiting > 1:
writemessage('canceling..')
- time.sleep(2)
break
time.sleep(0.02)
if usbconnected == True: