AP_NavEKF: enable plotting in plot2.dat too

This commit is contained in:
Andrew Tridgell 2014-01-05 21:23:48 +08:00
parent ab2a5a0672
commit 77c4968342

View File

@ -1,12 +1,21 @@
#!/bin/sh #!/bin/bash
cmd="plot " cmd="plot "
echo $# echo $#
while [ $# -gt 1 ]; do while [ $# -gt 1 ]; do
cmd="$cmd 'plot.dat' using 1:'$1'," if [[ "$1" == *.* ]]; then
cmd="$cmd 'plot.dat' using 1:'$1',"
else
cmd="$cmd 'plot2.dat' using 1:'$1',"
fi
shift shift
done done
cmd="$cmd 'plot.dat' using 1:'$1'" if [[ "$1" == *.* ]]; then
cmd="$cmd 'plot.dat' using 1:'$1'"
else
cmd="$cmd 'plot2.dat' using 1:'$1'"
fi
echo $cmd
cat <<EOF > _plot.gnu cat <<EOF > _plot.gnu
set style data lines set style data lines
set xlabel "time(s)" set xlabel "time(s)"