mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 23:11:36 +08:00
Reduce delay between board search attempts, code style
This commit is contained in:
@@ -575,10 +575,10 @@ try:
|
|||||||
# we could loop here if we wanted to wait for more boards...
|
# we could loop here if we wanted to wait for more boards...
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
#Rate-limit retries to prevent spin-lock from hogging the CPU
|
# Delay retries to < 20 Hz to prevent spin-lock from hogging the CPU
|
||||||
time.sleep(0.5)
|
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:
|
except KeyboardInterrupt:
|
||||||
print("\n Upload aborted by user.")
|
print("\n Upload aborted by user.")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
Reference in New Issue
Block a user