mirror of https://github.com/ArduPilot/ardupilot
autotest: restart MAVProxy if it exits when running under gdb
this is useful if you are running under GDB and ArduPilot fails early (eg. parameter sanity checks or SITL device configuration issues)
This commit is contained in:
parent
a8ce43426b
commit
b8e84cdcd0
|
@ -986,6 +986,17 @@ def start_mavproxy(opts, stuff):
|
|||
run_cmd_blocking("Run MavProxy", cmd, env=env)
|
||||
progress("MAVProxy exited")
|
||||
|
||||
if opts.gdb:
|
||||
# in the case that MAVProxy exits (as opposed to being
|
||||
# killed), restart it if we are running under GDB. This
|
||||
# allows ArduPilot to stop (eg. via a very early panic call)
|
||||
# and have you debugging session not be killed.
|
||||
while True:
|
||||
progress("Running under GDB; restarting MAVProxy")
|
||||
run_cmd_blocking("Run MavProxy", cmd, env=env)
|
||||
progress("MAVProxy exited; sleeping 10")
|
||||
time.sleep(10)
|
||||
|
||||
|
||||
vehicle_options_string = '|'.join(vinfo.options.keys())
|
||||
|
||||
|
|
Loading…
Reference in New Issue