mirror of https://github.com/ArduPilot/ardupilot
autotest: fix for new sim_multicopter.py command
This commit is contained in:
parent
5317e47e2d
commit
45efb174e5
|
@ -280,11 +280,11 @@ def fly_ArduCopter(viewerip=None):
|
||||||
'''
|
'''
|
||||||
global homeloc
|
global homeloc
|
||||||
|
|
||||||
simquad_cmd = util.reltopdir('Tools/autotest/pysim/sim_quad.py') + ' --rate=400 --home=%f,%f,%u,%u' % (
|
sim_cmd = util.reltopdir('Tools/autotest/pysim/sim_multicopter.py') + ' --rate=400 --home=%f,%f,%u,%u' % (
|
||||||
HOME.lat, HOME.lng, HOME.alt, HOME.heading)
|
HOME.lat, HOME.lng, HOME.alt, HOME.heading)
|
||||||
simquad_cmd += ' --wind=6,45,.3'
|
sim_cmd += ' --wind=6,45,.3'
|
||||||
if viewerip:
|
if viewerip:
|
||||||
simquad_cmd += ' --fgout=%s:5503' % viewerip
|
sim_cmd += ' --fgout=%s:5503' % viewerip
|
||||||
|
|
||||||
sil = util.start_SIL('ArduCopter', wipe=True)
|
sil = util.start_SIL('ArduCopter', wipe=True)
|
||||||
mavproxy = util.start_MAVProxy_SIL('ArduCopter', options='--sitl=127.0.0.1:5501 --out=127.0.0.1:19550 --quadcopter')
|
mavproxy = util.start_MAVProxy_SIL('ArduCopter', options='--sitl=127.0.0.1:5501 --out=127.0.0.1:19550 --quadcopter')
|
||||||
|
@ -300,9 +300,9 @@ def fly_ArduCopter(viewerip=None):
|
||||||
util.pexpect_close(sil)
|
util.pexpect_close(sil)
|
||||||
|
|
||||||
sil = util.start_SIL('ArduCopter', height=HOME.alt)
|
sil = util.start_SIL('ArduCopter', height=HOME.alt)
|
||||||
simquad = pexpect.spawn(simquad_cmd, logfile=sys.stdout, timeout=10)
|
sim = pexpect.spawn(sim_cmd, logfile=sys.stdout, timeout=10)
|
||||||
simquad.delaybeforesend = 0
|
sim.delaybeforesend = 0
|
||||||
util.pexpect_autoclose(simquad)
|
util.pexpect_autoclose(sim)
|
||||||
options = '--sitl=127.0.0.1:5501 --out=127.0.0.1:19550 --quadcopter --streamrate=5'
|
options = '--sitl=127.0.0.1:5501 --out=127.0.0.1:19550 --quadcopter --streamrate=5'
|
||||||
if viewerip:
|
if viewerip:
|
||||||
options += ' --out=%s:14550' % viewerip
|
options += ' --out=%s:14550' % viewerip
|
||||||
|
@ -323,7 +323,7 @@ def fly_ArduCopter(viewerip=None):
|
||||||
util.expect_setup_callback(mavproxy, expect_callback)
|
util.expect_setup_callback(mavproxy, expect_callback)
|
||||||
|
|
||||||
expect_list_clear()
|
expect_list_clear()
|
||||||
expect_list_extend([simquad, sil, mavproxy])
|
expect_list_extend([sim, sil, mavproxy])
|
||||||
|
|
||||||
# get a mavlink connection going
|
# get a mavlink connection going
|
||||||
try:
|
try:
|
||||||
|
@ -451,7 +451,7 @@ def fly_ArduCopter(viewerip=None):
|
||||||
mav.close()
|
mav.close()
|
||||||
util.pexpect_close(mavproxy)
|
util.pexpect_close(mavproxy)
|
||||||
util.pexpect_close(sil)
|
util.pexpect_close(sil)
|
||||||
util.pexpect_close(simquad)
|
util.pexpect_close(sim)
|
||||||
|
|
||||||
if os.path.exists('ArduCopter-valgrind.log'):
|
if os.path.exists('ArduCopter-valgrind.log'):
|
||||||
os.chmod('ArduCopter-valgrind.log', 0644)
|
os.chmod('ArduCopter-valgrind.log', 0644)
|
||||||
|
|
Loading…
Reference in New Issue