mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 17:38:32 -04:00
pysim: accept frame type in sim_arducopter.sh
This commit is contained in:
parent
45b4e07776
commit
eab1ae59d0
@ -3,16 +3,35 @@
|
|||||||
set -e
|
set -e
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
if [ $# -eq 1 ]; then
|
||||||
|
frame="$1"
|
||||||
|
target="sitl-$frame"
|
||||||
|
else
|
||||||
|
frame="+"
|
||||||
|
target="sitl"
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $frame in
|
||||||
|
+,X,quad)
|
||||||
|
target="sitl"
|
||||||
|
;;
|
||||||
|
octa)
|
||||||
|
target="sitl-octa"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "Building with target $target for frame $frame"
|
||||||
|
|
||||||
autotest=$(dirname $(readlink -e $0))
|
autotest=$(dirname $(readlink -e $0))
|
||||||
pushd $autotest/../../ArduCopter
|
pushd $autotest/../../ArduCopter
|
||||||
make clean sitl
|
make clean $target
|
||||||
|
|
||||||
tfile=$(tempfile)
|
tfile=$(tempfile)
|
||||||
echo r > $tfile
|
echo r > $tfile
|
||||||
gnome-terminal -e "gdb -x $tfile --args /tmp/ArduCopter.build/ArduCopter.elf"
|
gnome-terminal -e "gdb -x $tfile --args /tmp/ArduCopter.build/ArduCopter.elf"
|
||||||
sleep 2
|
sleep 2
|
||||||
rm -f $tfile
|
rm -f $tfile
|
||||||
gnome-terminal -e '../Tools/autotest/pysim/sim_quad.py --home=-35.362938,149.165085,584,270'
|
gnome-terminal -e "../Tools/autotest/pysim/sim_multicopter.py --frame=$frame --home=-35.362938,149.165085,584,270"
|
||||||
sleep 2
|
sleep 2
|
||||||
popd
|
popd
|
||||||
mavproxy.py --master tcp:127.0.0.1:5760 --sitl 127.0.0.1:5501 --out 127.0.0.1:14550 --out 127.0.0.1:14551 --quadcopter
|
mavproxy.py --master tcp:127.0.0.1:5760 --sitl 127.0.0.1:5501 --out 127.0.0.1:14550 --out 127.0.0.1:14551 --quadcopter
|
||||||
|
Loading…
Reference in New Issue
Block a user