Skip to content

Commit

Permalink
Pass the --gimbal option through to legacy SITL (#102)
Browse files Browse the repository at this point in the history
* requires that apm is built with the make sitl-mount target
  • Loading branch information
wsilva32 authored and mrpollo committed Sep 1, 2016
1 parent f78e36b commit bbd0c0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions dronekit_sitl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def launch(self, args, verbose=False, await_ready=False, restart=False, wd=None,
parser.add_argument('--rate')
parser.add_argument('--model')
parser.add_argument('-C', action='store_true')
parser.add_argument('--gimbal', action='store_true')
def noop(*args, **kwargs):
pass

Expand All @@ -233,6 +234,10 @@ def noop(*args, **kwargs):
simargs = [sys.executable, os.path.join(os.path.dirname(__file__), 'pysim/sim_wrapper.py'),
'--simin=127.0.0.1:5502', '--simout=127.0.0.1:5501', '--fgout=127.0.0.1:5503',
'--home='+res.home, '--frame='+res.model]

if res.gimbal:
simargs.append('--gimbal')

psim = Popen(simargs, cwd=wd, shell=sys.platform == 'win32')

def cleanup_sim():
Expand Down
2 changes: 1 addition & 1 deletion stage/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ cd ardupilot/$TARGET_ARDU
buildit () {
make clean BUILDROOT=$STAGING || true
make configure SKETCHBOOK=$(pwd)/.. BUILDROOT=$STAGING || true
make sitl SKETCHBOOK=$(pwd)/.. BUILDROOT=$STAGING -j64 $MAKEARGS
make sitl-mount SKETCHBOOK=$(pwd)/.. BUILDROOT=$STAGING -j64 $MAKEARGS
}

# Thrice is nice. Works around build bugs in ArduCopter 3.2.x
Expand Down

0 comments on commit bbd0c0a

Please sign in to comment.