diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-02-26 13:07:43 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-02-26 13:07:43 +0100 |
commit | 6d2e8b9d08ec3ce811cd0fc4cc5a1c561dee2195 (patch) | |
tree | 0b3c90d815beaa894446065c24d23c5c24fa5946 /Tools/px_uploader.py | |
parent | 74177a2688f1163ec9659f3847d7cd17d0eb325f (diff) | |
download | px4-firmware-6d2e8b9d08ec3ce811cd0fc4cc5a1c561dee2195.tar.gz px4-firmware-6d2e8b9d08ec3ce811cd0fc4cc5a1c561dee2195.tar.bz2 px4-firmware-6d2e8b9d08ec3ce811cd0fc4cc5a1c561dee2195.zip |
Reduce delay between board search attempts, code style
Diffstat (limited to 'Tools/px_uploader.py')
-rwxr-xr-x | Tools/px_uploader.py | 10 |
1 files changed, 5 insertions, 5 deletions
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) |