diff options
author | Johan Jansen <jnsn.johan@gmail.com> | 2015-01-12 12:25:30 +0100 |
---|---|---|
committer | Johan Jansen <jnsn.johan@gmail.com> | 2015-01-12 12:25:30 +0100 |
commit | 11469ad9b5e54167604f4b46dd0b826ba4f1889b (patch) | |
tree | a05e9932730d6290674f2f56643d25837109be10 | |
parent | 0954ee74714373ee99740cbadb665874b95faa19 (diff) | |
download | px4-firmware-11469ad9b5e54167604f4b46dd0b826ba4f1889b.tar.gz px4-firmware-11469ad9b5e54167604f4b46dd0b826ba4f1889b.tar.bz2 px4-firmware-11469ad9b5e54167604f4b46dd0b826ba4f1889b.zip |
px_uploader: Small fix to properly display timeouts
-rwxr-xr-x | Tools/px_uploader.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Tools/px_uploader.py b/Tools/px_uploader.py index 272080619..c46f6bede 100755 --- a/Tools/px_uploader.py +++ b/Tools/px_uploader.py @@ -287,11 +287,12 @@ class uploader(object): #Draw progress bar (erase usually takes about 9 seconds to complete) estimatedTimeRemaining = deadline-time.time() - if estimatedTimeRemaining > 0: + if estimatedTimeRemaining >= 9.0: self.__drawProgressBar(20.0-estimatedTimeRemaining, 9.0) else: self.__drawProgressBar(10.0, 10.0) - sys.stdout.write(" (timeout: %d seconds) " % int(time.time()-deadline) ) + sys.stdout.write(" (timeout: %d seconds) " % int(deadline-time.time()) ) + sys.stdout.flush() if self.__trySync(): self.__drawProgressBar(10.0, 10.0) |