mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 21:43:33 +08:00
Added a self test feature to the VOXL 2 muorb module (#20307)
* Removed exit after dsp signature generation. * First full test suite * Cleaned up the muorb tests * Improved VOXL 2 self test trigger in startup file * Removed unneeded include file
This commit is contained in:
@@ -13,24 +13,26 @@ else
|
||||
/share/modalai/qrb5165-slpi-test-sig/generate-test-sig.sh
|
||||
else
|
||||
/bin/echo "Could not find the DSP signature file generation script"
|
||||
exit 0
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Make sure to setup all of the needed px4 aliases.
|
||||
cd /usr/bin
|
||||
/bin/ln -f -s px4 px4-muorb
|
||||
/bin/ln -f -s px4 px4-uorb
|
||||
cd -
|
||||
|
||||
DAEMON=" "
|
||||
S="OFF"
|
||||
|
||||
while getopts "d" flag
|
||||
while getopts "ds" flag
|
||||
do
|
||||
case "${flag}" in
|
||||
# Use -d to put PX4 into daemon mode
|
||||
d) DAEMON="-d";;
|
||||
# Use -s to run self tests
|
||||
s) S="ON";;
|
||||
esac
|
||||
done
|
||||
|
||||
px4 $DAEMON -s /etc/modalai/voxl-px4.config
|
||||
TESTMODE=$S px4 $DAEMON -s /etc/modalai/voxl-px4.config
|
||||
|
||||
@@ -3,4 +3,17 @@
|
||||
# (px4-alias.sh is expected to be in the PATH)
|
||||
. px4-alias.sh
|
||||
|
||||
if [ $TESTMODE = "ON" ]; then
|
||||
/bin/echo "Running self tests"
|
||||
muorb test
|
||||
MUORB_TEST_STATUS=$?
|
||||
if [ $MUORB_TEST_STATUS -ne 0 ]; then
|
||||
/bin/echo "muorb test failed"
|
||||
shutdown
|
||||
exit 0
|
||||
else
|
||||
/bin/echo "muorb test passed"
|
||||
fi
|
||||
fi
|
||||
|
||||
muorb start
|
||||
|
||||
Reference in New Issue
Block a user