CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/Tools/scripts/build_log_message_documentation.sh
Views: 1798
1
#!/usr/bin/env bash
2
3
set -e
4
set -x
5
6
if [ "x$BUILDLOGS" = "x" ]; then
7
BUILDLOGS="../buildlogs"
8
fi
9
DIR="$BUILDLOGS/LogMessages"
10
11
# work from either APM directory or above
12
[ -d ArduPlane ] || cd APM
13
14
/bin/mkdir -p "$DIR"
15
16
generate_log_message_documentation() {
17
VEHICLE="$1"
18
19
# generate Parameters.html, Parameters.rst etc etc:
20
./Tools/autotest/logger_metadata/parse.py --vehicle "$VEHICLE"
21
22
# stash some of the results away:
23
VEHICLE_DIR="$DIR/$VEHICLE"
24
mkdir -p "$VEHICLE_DIR"
25
/bin/cp LogMessages.* "$VEHICLE_DIR/"
26
gzip -9 <"$VEHICLE_DIR"/LogMessages.xml >"$VEHICLE_DIR"/LogMessages.xml.gz.new && mv "$VEHICLE_DIR"/LogMessages.xml.gz.new "$VEHICLE_DIR"/LogMessages.xml.gz
27
xz -e <"$VEHICLE_DIR"/LogMessages.xml >"$VEHICLE_DIR"/LogMessages.xml.xz.new && mv "$VEHICLE_DIR"/LogMessages.xml.xz.new "$VEHICLE_DIR"/LogMessages.xml.xz
28
}
29
30
for vehicle in Rover Plane Copter Tracker Blimp Sub; do
31
generate_log_message_documentation "$vehicle"
32
done
33
34