We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fbb8d9 commit 4fcd255Copy full SHA for 4fcd255
Metro/Metro_RP2350_Minesweeper/code.py
@@ -123,7 +123,8 @@ def update_ui():
123
time.sleep(1)
124
125
good_devices = False
126
-while not good_devices:
+wait_time = time.monotonic() + 10 # wait up to 20 seconds for a good device to be found
127
+while not good_devices and time.monotonic() < wait_time:
128
for device in usb.core.find(find_all=True):
129
if device.manufacturer is not None:
130
good_devices = True
0 commit comments