|
|
|
@ -880,7 +880,7 @@ def fly_ArduCopter(viewerip=None, map=False):
@@ -880,7 +880,7 @@ def fly_ArduCopter(viewerip=None, map=False):
|
|
|
|
|
if TARGET != 'sitl': |
|
|
|
|
util.build_SIL('ArduCopter', target=TARGET) |
|
|
|
|
|
|
|
|
|
sim_cmd = util.reltopdir('Tools/autotest/pysim/sim_multicopter.py') + ' --frame=%s --rate=400 --home=%f,%f,%u,%u' % ( |
|
|
|
|
sim_cmd = util.reltopdir('Tools/autotest/pysim/sim_multicopter.py') + ' --frame=%s --nowait --nowait --rate=800 --home=%f,%f,%u,%u' % ( |
|
|
|
|
FRAME, HOME.lat, HOME.lng, HOME.alt, HOME.heading) |
|
|
|
|
sim_cmd += ' --wind=6,45,.3' |
|
|
|
|
if viewerip: |
|
|
|
@ -888,6 +888,9 @@ def fly_ArduCopter(viewerip=None, map=False):
@@ -888,6 +888,9 @@ def fly_ArduCopter(viewerip=None, map=False):
|
|
|
|
|
|
|
|
|
|
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') |
|
|
|
|
sim = pexpect.spawn(sim_cmd, logfile=sys.stdout, timeout=10) |
|
|
|
|
sim.delaybeforesend = 0 |
|
|
|
|
util.pexpect_autoclose(sim) |
|
|
|
|
mavproxy.expect('Received [0-9]+ parameters') |
|
|
|
|
|
|
|
|
|
# setup test parameters |
|
|
|
@ -897,11 +900,9 @@ def fly_ArduCopter(viewerip=None, map=False):
@@ -897,11 +900,9 @@ def fly_ArduCopter(viewerip=None, map=False):
|
|
|
|
|
# reboot with new parameters |
|
|
|
|
util.pexpect_close(mavproxy) |
|
|
|
|
util.pexpect_close(sil) |
|
|
|
|
util.pexpect_close(sim) |
|
|
|
|
|
|
|
|
|
sil = util.start_SIL('ArduCopter', height=HOME.alt) |
|
|
|
|
sim = pexpect.spawn(sim_cmd, logfile=sys.stdout, timeout=10) |
|
|
|
|
sim.delaybeforesend = 0 |
|
|
|
|
util.pexpect_autoclose(sim) |
|
|
|
|
options = '--sitl=127.0.0.1:5501 --out=127.0.0.1:19550 --quadcopter --streamrate=5' |
|
|
|
|
if viewerip: |
|
|
|
|
options += ' --out=%s:14550' % viewerip |
|
|
|
@ -912,6 +913,10 @@ def fly_ArduCopter(viewerip=None, map=False):
@@ -912,6 +913,10 @@ def fly_ArduCopter(viewerip=None, map=False):
|
|
|
|
|
logfile = mavproxy.match.group(1) |
|
|
|
|
print("LOGFILE %s" % logfile) |
|
|
|
|
|
|
|
|
|
sim = pexpect.spawn(sim_cmd, logfile=sys.stdout, timeout=10) |
|
|
|
|
sim.delaybeforesend = 0 |
|
|
|
|
util.pexpect_autoclose(sim) |
|
|
|
|
|
|
|
|
|
buildlog = util.reltopdir("../buildlogs/ArduCopter-test.tlog") |
|
|
|
|
print("buildlog=%s" % buildlog) |
|
|
|
|
copyTLog = False |
|
|
|
@ -1247,13 +1252,16 @@ def fly_CopterAVC(viewerip=None, map=False):
@@ -1247,13 +1252,16 @@ def fly_CopterAVC(viewerip=None, map=False):
|
|
|
|
|
if TARGET != 'sitl': |
|
|
|
|
util.build_SIL('ArduCopter', target=TARGET) |
|
|
|
|
|
|
|
|
|
sim_cmd = util.reltopdir('Tools/autotest/pysim/sim_multicopter.py') + ' --frame=%s --rate=400 --home=%f,%f,%u,%u' % ( |
|
|
|
|
sim_cmd = util.reltopdir('Tools/autotest/pysim/sim_multicopter.py') + ' --frame=%s --rate=400 --nowait --home=%f,%f,%u,%u' % ( |
|
|
|
|
FRAME, AVCHOME.lat, AVCHOME.lng, AVCHOME.alt, AVCHOME.heading) |
|
|
|
|
if viewerip: |
|
|
|
|
sim_cmd += ' --fgout=%s:5503' % viewerip |
|
|
|
|
|
|
|
|
|
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') |
|
|
|
|
sim = pexpect.spawn(sim_cmd, logfile=sys.stdout, timeout=10) |
|
|
|
|
sim.delaybeforesend = 0 |
|
|
|
|
util.pexpect_autoclose(sim) |
|
|
|
|
mavproxy.expect('Received [0-9]+ parameters') |
|
|
|
|
|
|
|
|
|
# setup test parameters |
|
|
|
@ -1263,11 +1271,9 @@ def fly_CopterAVC(viewerip=None, map=False):
@@ -1263,11 +1271,9 @@ def fly_CopterAVC(viewerip=None, map=False):
|
|
|
|
|
# reboot with new parameters |
|
|
|
|
util.pexpect_close(mavproxy) |
|
|
|
|
util.pexpect_close(sil) |
|
|
|
|
util.pexpect_close(sim) |
|
|
|
|
|
|
|
|
|
sil = util.start_SIL('ArduCopter', height=HOME.alt) |
|
|
|
|
sim = pexpect.spawn(sim_cmd, logfile=sys.stdout, timeout=10) |
|
|
|
|
sim.delaybeforesend = 0 |
|
|
|
|
util.pexpect_autoclose(sim) |
|
|
|
|
options = '--sitl=127.0.0.1:5501 --out=127.0.0.1:19550 --quadcopter --streamrate=5' |
|
|
|
|
if viewerip: |
|
|
|
|
options += ' --out=%s:14550' % viewerip |
|
|
|
@ -1278,6 +1284,10 @@ def fly_CopterAVC(viewerip=None, map=False):
@@ -1278,6 +1284,10 @@ def fly_CopterAVC(viewerip=None, map=False):
|
|
|
|
|
logfile = mavproxy.match.group(1) |
|
|
|
|
print("LOGFILE %s" % logfile) |
|
|
|
|
|
|
|
|
|
sim = pexpect.spawn(sim_cmd, logfile=sys.stdout, timeout=10) |
|
|
|
|
sim.delaybeforesend = 0 |
|
|
|
|
util.pexpect_autoclose(sim) |
|
|
|
|
|
|
|
|
|
buildlog = util.reltopdir("../buildlogs/CopterAVC-test.tlog") |
|
|
|
|
print("buildlog=%s" % buildlog) |
|
|
|
|
if os.path.exists(buildlog): |
|
|
|
|