Reduce delay between board search attempts, code style

This commit is contained in:
Lorenz Meier 2015-02-26 13:07:43 +01:00
parent 74177a2688
commit 6d2e8b9d08
1 changed files with 5 additions and 5 deletions

View File

@ -552,7 +552,7 @@ try:
print("if the board does not respond, unplug and re-plug the USB connector.")
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)
# always close the port
@ -575,10 +575,10 @@ try:
# we could loop here if we wanted to wait for more boards...
sys.exit(0)
#Rate-limit retries to prevent spin-lock from hogging the CPU
time.sleep(0.5)
# Delay retries to < 20 Hz to prevent spin-lock from hogging the CPU
time.sleep(0.05)
#CTRL+C aborts the upload/spin-lock by interrupt mechanics
# CTRL+C aborts the upload/spin-lock by interrupt mechanics
except KeyboardInterrupt:
print("\n Upload aborted by user.")
sys.exit(0)
sys.exit(0)