bricks/primehub/install: Optionally skip reboot.
This is useful for development because the hub stays connected.
import firmware
+import hub
+
import ubinascii
import umachine
import utime
@@ -202,6 +204,11 @@ def install():
else:
print("Firmware image not accepted. It will not be installed.")
+ # Skip reboot if right button is held.
+ if hub.button.right.is_pressed():
+ print("Skipping reboot.")
+ return
+
# Reboot soon, giving some time to softly disconnect.
print("Rebooting soon! Please wait.")
timer = umachine.Timer()
