From 64b541037e1eeafc655c6886c3a4936a6bba71f8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 4 Jan 2012 22:03:37 +1100 Subject: [PATCH] autotest: change to an octa frame for autotest this will be a useful experiment --- Tools/autotest/arducopter.py | 10 +++++++--- Tools/autotest/pysim/util.py | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Tools/autotest/arducopter.py b/Tools/autotest/arducopter.py index 54adc9f3fe..8ef0e4e685 100644 --- a/Tools/autotest/arducopter.py +++ b/Tools/autotest/arducopter.py @@ -7,7 +7,8 @@ import mavutil, mavwp, random # get location of scripts testdir=os.path.dirname(os.path.realpath(__file__)) - +FRAME='octa' +TARGET='sitl-octa' HOME=location(-35.362938,149.165085,584,270) homeloc = None @@ -280,8 +281,11 @@ def fly_ArduCopter(viewerip=None): ''' global homeloc - 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) + 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' % ( + FRAME, HOME.lat, HOME.lng, HOME.alt, HOME.heading) sim_cmd += ' --wind=6,45,.3' if viewerip: sim_cmd += ' --fgout=%s:5503' % viewerip diff --git a/Tools/autotest/pysim/util.py b/Tools/autotest/pysim/util.py index 6566cfcc0f..c689a6bf03 100644 --- a/Tools/autotest/pysim/util.py +++ b/Tools/autotest/pysim/util.py @@ -139,9 +139,9 @@ def deltree(path): -def build_SIL(atype): +def build_SIL(atype, target='sitl'): '''build desktop SIL''' - run_cmd("make clean sitl", + run_cmd("make clean %s" % target, dir=reltopdir(atype), checkfail=True) return True