2013-03-18 01:15:50 -03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
2018-03-13 01:47:04 -03:00
|
|
|
set -x
|
2016-03-17 02:52:54 -03:00
|
|
|
|
|
|
|
PARAMS_DIR="../buildlogs/Parameters"
|
2013-03-18 01:15:50 -03:00
|
|
|
|
2013-05-29 23:19:50 -03:00
|
|
|
# work from either APM directory or above
|
|
|
|
[ -d ArduPlane ] || cd APM
|
|
|
|
|
2016-03-17 02:52:54 -03:00
|
|
|
/bin/mkdir -p "$PARAMS_DIR"
|
|
|
|
|
|
|
|
generate_parameters() {
|
|
|
|
VEHICLE="$1"
|
|
|
|
|
|
|
|
# generate Parameters.html, Parameters.rst etc etc:
|
|
|
|
./Tools/autotest/param_metadata/param_parse.py --vehicle $VEHICLE
|
|
|
|
|
|
|
|
# stash some of the results away:
|
|
|
|
VEHICLE_PARAMS_DIR="$PARAMS_DIR/$VEHICLE"
|
|
|
|
mkdir -p "$VEHICLE_PARAMS_DIR"
|
2021-04-06 23:24:39 -03:00
|
|
|
/bin/cp Parameters.html *.pdef.xml "$VEHICLE_PARAMS_DIR/"
|
2020-09-13 21:55:00 -03:00
|
|
|
gzip -9 <"$VEHICLE_PARAMS_DIR"/apm.pdef.xml >"$VEHICLE_PARAMS_DIR"/apm.pdef.xml.gz.new && mv "$VEHICLE_PARAMS_DIR"/apm.pdef.xml.gz.new "$VEHICLE_PARAMS_DIR"/apm.pdef.xml.gz
|
|
|
|
xz -e <"$VEHICLE_PARAMS_DIR"/apm.pdef.xml >"$VEHICLE_PARAMS_DIR"/apm.pdef.xml.xz.new && mv "$VEHICLE_PARAMS_DIR"/apm.pdef.xml.xz.new "$VEHICLE_PARAMS_DIR"/apm.pdef.xml.xz
|
2016-03-17 03:01:15 -03:00
|
|
|
if [ -e "Parameters.rst" ]; then
|
|
|
|
/bin/cp Parameters.rst "$VEHICLE_PARAMS_DIR/"
|
|
|
|
fi
|
2021-08-18 21:37:55 -03:00
|
|
|
if [ -e "ParametersLatex.rst" ]; then
|
|
|
|
/bin/cp ParametersLatex.rst "$VEHICLE_PARAMS_DIR/"
|
|
|
|
fi
|
2013-05-27 10:06:18 -03:00
|
|
|
}
|
2016-03-17 02:52:54 -03:00
|
|
|
|
2021-04-07 02:20:00 -03:00
|
|
|
generate_sitl_parameters() {
|
|
|
|
VEHICLE="ArduCopter"
|
|
|
|
|
|
|
|
# generate Parameters.html, Parameters.rst etc etc:
|
|
|
|
./Tools/autotest/param_metadata/param_parse.py --sitl --vehicle $VEHICLE
|
|
|
|
|
|
|
|
# stash some of the results away:
|
|
|
|
VEHICLE_PARAMS_DIR="$PARAMS_DIR/SITL"
|
|
|
|
mkdir -p "$VEHICLE_PARAMS_DIR"
|
|
|
|
/bin/cp Parameters.html *.pdef.xml "$VEHICLE_PARAMS_DIR/"
|
|
|
|
gzip -9 <"$VEHICLE_PARAMS_DIR"/apm.pdef.xml >"$VEHICLE_PARAMS_DIR"/apm.pdef.xml.gz.new && mv "$VEHICLE_PARAMS_DIR"/apm.pdef.xml.gz.new "$VEHICLE_PARAMS_DIR"/apm.pdef.xml.gz
|
|
|
|
xz -e <"$VEHICLE_PARAMS_DIR"/apm.pdef.xml >"$VEHICLE_PARAMS_DIR"/apm.pdef.xml.xz.new && mv "$VEHICLE_PARAMS_DIR"/apm.pdef.xml.xz.new "$VEHICLE_PARAMS_DIR"/apm.pdef.xml.xz
|
|
|
|
if [ -e "Parameters.rst" ]; then
|
|
|
|
/bin/cp Parameters.rst "$VEHICLE_PARAMS_DIR/"
|
|
|
|
fi
|
2021-08-18 21:37:55 -03:00
|
|
|
if [ -e "ParametersLatex.rst" ]; then
|
|
|
|
/bin/cp ParametersLatex.rst "$VEHICLE_PARAMS_DIR/"
|
|
|
|
fi
|
2021-04-07 02:20:00 -03:00
|
|
|
}
|
2016-03-17 02:52:54 -03:00
|
|
|
|
2020-03-11 05:01:06 -03:00
|
|
|
generate_parameters ArduPlane
|
2016-03-17 02:52:54 -03:00
|
|
|
|
2020-03-11 05:01:06 -03:00
|
|
|
generate_parameters ArduCopter
|
2016-03-17 02:52:54 -03:00
|
|
|
|
2020-03-26 21:51:16 -03:00
|
|
|
generate_parameters Rover
|
2016-03-17 02:52:54 -03:00
|
|
|
|
2020-03-11 05:01:06 -03:00
|
|
|
generate_parameters ArduSub
|
2017-03-02 00:43:38 -04:00
|
|
|
|
2020-03-11 05:01:06 -03:00
|
|
|
generate_parameters AntennaTracker
|
2021-04-07 02:20:00 -03:00
|
|
|
|
2021-04-10 21:06:35 -03:00
|
|
|
generate_parameters AP_Periph
|
|
|
|
|
2021-04-07 02:20:00 -03:00
|
|
|
generate_sitl_parameters
|