forked from Archive/PX4-Autopilot
Better error handling instructions
This commit is contained in:
parent
44a2473632
commit
72977ee909
|
@ -459,6 +459,7 @@ if os.path.exists("/usr/sbin/ModemManager"):
|
||||||
# Load the firmware file
|
# Load the firmware file
|
||||||
fw = firmware(args.firmware)
|
fw = firmware(args.firmware)
|
||||||
print("Loaded firmware for %x,%x, waiting for the bootloader..." % (fw.property('board_id'), fw.property('board_revision')))
|
print("Loaded firmware for %x,%x, waiting for the bootloader..." % (fw.property('board_id'), fw.property('board_revision')))
|
||||||
|
print("If the board does not respond within 1-2 seconds, unplug and re-plug the USB connector.")
|
||||||
|
|
||||||
# Spin waiting for a device to show up
|
# Spin waiting for a device to show up
|
||||||
while True:
|
while True:
|
||||||
|
@ -508,6 +509,7 @@ while True:
|
||||||
except Exception:
|
except Exception:
|
||||||
# most probably a timeout talking to the port, no bootloader, try to reboot the board
|
# most probably a timeout talking to the port, no bootloader, try to reboot the board
|
||||||
print("attempting reboot on %s..." % port)
|
print("attempting reboot on %s..." % port)
|
||||||
|
print("if the board does not respond, unplug and re-plug the USB connector.")
|
||||||
up.send_reboot()
|
up.send_reboot()
|
||||||
# wait for the reboot, without we might run into Serial I/O Error 5
|
# wait for the reboot, without we might run into Serial I/O Error 5
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
|
|
Loading…
Reference in New Issue