uorb graphs: add script to create graph from a posix startup script

This commit is contained in:
Beat Küng committed 2017-12-18 10:19:15 +01:00
1 parent e2d6c0a8f9
commit 9bff0c8c04
2 files changed
+23 -29

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
#! /bin/bash
# create the graph from a posix (e.g. SITL) startup script
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
startup_file="$SCRIPT_DIR"/../../posix-configs/SITL/init/ekf2/typhoon_h480
[ -n "$1" ] && startup_file=$1
# get the modules as comma-separated list
modules=$(cat "$startup_file"|cut -f1 -d' '|sort|uniq|tr '\n' ,)
cd "$SCRIPT_DIR/../.."
"$SCRIPT_DIR"/create.py --src-path src -m "$modules" -f "$SCRIPT_DIR/graph_sitl"