commit e4bdcfb12fd67454b09b9f61ad5304896537a351
parent 26e0b48e2498649694444df70fbc22ff6d1d59ac
Author: rbckman <rob@tarina.org>
Date: Sat, 6 Dec 2025 15:53:32 +0200
wait for USB drive to become ready
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gonzopi.py b/gonzopi.py
@@ -6967,6 +6967,7 @@ def usbfilmfolder(dsk):
buttontime = time.time()
holdbutton = ''
writemessage('Searching for usb storage device, middlebutton to cancel')
+ time.sleep(2)
if os.path.exists('/dev/sda1') == True:
os.system('sudo mount -o noatime,nodiratime,async /dev/sda1 /media/usb0')
os.system('sudo chown pi /media/usb0')
@@ -6983,6 +6984,7 @@ def usbfilmfolder(dsk):
usbconnected = os.path.ismount('/media/usb'+str(usbmount))
if pressed == 'middle' or time.time() - waiting > 8:
writemessage('canceling..')
+ time.sleep(1)
break
time.sleep(0.02)
if usbconnected == True:
@@ -7002,9 +7004,11 @@ def usbfilmfolder(dsk):
os.system('sudo chmod 755 '+filmfolder)
#run_command('pumount /media/usb'+str(usbmount))
writemessage('Filming to USB'+str(usbmount))
- #time.sleep(1)
+ time.sleep(2)
return filmfolder
else:
+ writemessage('Filming to SDCARD')
+ time.sleep(2)
return
#--------------Copy to USB-------------------