updated to master (solve merge conflicts)

This commit is contained in:
Youssef Demitri
2015-11-06 12:18:31 +01:00
72 changed files with 1418 additions and 830 deletions
+5 -1
View File
@@ -72,9 +72,13 @@ class XMLOutput():
xml_field.text = value
for code in param.GetOutputCodes():
value = param.GetOutputValue(code)
valstrs = value.split(";")
xml_field = ET.SubElement(xml_param, "output")
xml_field.attrib["name"] = code
xml_field.text = value
for attrib in valstrs[1:]:
attribstrs = attrib.split(":")
xml_field.attrib[attribstrs[0].strip()] = attribstrs[1].strip()
xml_field.text = valstrs[0]
if last_param_name != param.GetName():
board_specific_param_set = False
indent(xml_parameters)
+2 -3
View File
@@ -57,7 +57,7 @@ def main():
for (root, dirs, files) in os.walk(args.folder):
for file in files:
# only prune text files
if ".zip" in file or ".bin" in file or ".swp" in file or ".data" in file:
if ".zip" in file or ".bin" in file or ".swp" in file or ".data" in file or ".DS_Store" in file:
continue
file_path = os.path.join(root, file)
@@ -74,8 +74,7 @@ def main():
else:
if not line.isspace() and not line.strip().startswith("#"):
pruned_content += line
# overwrite old scratch file
# overwrite old scratch file
with open(file_path, "wb") as f:
f.write(pruned_content.encode("ascii", errors='strict'))
+20 -8
View File
@@ -3,18 +3,27 @@
rc_script=$1
debugger=$2
program=$3
build_path=$4
model=$4
build_path=$5
curr_dir=`pwd`
echo SITL ARGS
echo rc_script: $rc_script
echo debugger: $debugger
echo program: $program
echo model: $model
echo build_path: $build_path
if [ "$#" != 4 ]
if [ "$model" == "" ] || [ "$model" == "none" ]
then
echo usage: sitl_run.sh rc_script debugger program build_path
echo "empty model, setting iris as default"
model="iris"
fi
if [ "$#" != 5 ]
then
echo usage: sitl_run.sh rc_script debugger program model build_path
echo ""
exit 1
fi
@@ -33,13 +42,13 @@ cp Tools/posix.gdbinit $build_path/src/firmware/posix/.gdbinit
SIM_PID=0
if [ "$program" == "jmavsim" ]
if [ "$program" == "jmavsim" ] && [ "$no_sim" == "" ]
then
cd Tools/jMAVSim
ant
java -Djava.ext.dirs= -cp lib/*:out/production/jmavsim.jar me.drton.jmavsim.Simulator -udp 127.0.0.1:14560 &
SIM_PID=`echo $!`
elif [ "$3" == "gazebo" ]
elif [ "$3" == "gazebo" ] && [ "$no_sim" == "" ]
then
if [ -x "$(command -v gazebo)" ]
then
@@ -54,8 +63,10 @@ then
cd Tools/sitl_gazebo/Build
cmake ..
make -j4
gazebo ../worlds/iris.world &
gzserver ../worlds/${model}.world &
SIM_PID=`echo $!`
gzclient &
GUI_PID=`echo $!`
else
echo "You need to have gazebo simulator installed!"
exit 1
@@ -76,10 +87,11 @@ else
./mainapp ../../../../${rc_script}_${program}
fi
if [ "$3" == "jmavsim" ]
if [ "$program" == "jmavsim" ]
then
kill -9 $SIM_PID
elif [ "$3" == "gazebo" ]
elif [ "$program" == "gazebo" ]
then
kill -9 $SIM_PID
kill -9 $GUI_PID
fi