From 6d2e8b9d08ec3ce811cd0fc4cc5a1c561dee2195 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Thu, 26 Feb 2015 13:07:43 +0100 Subject: Reduce delay between board search attempts, code style --- Tools/px_uploader.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Tools') diff --git a/Tools/px_uploader.py b/Tools/px_uploader.py index c9a142ddf..f4e317cfa 100755 --- a/Tools/px_uploader.py +++ b/Tools/px_uploader.py @@ -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) \ No newline at end of file + sys.exit(0) -- cgit v1.2.3