forked from Archive/PX4-Autopilot
34 lines
438 B
Plaintext
34 lines
438 B
Plaintext
|
#!nsh
|
||
|
# Logging
|
||
|
#
|
||
|
# Standard startup script for logging
|
||
|
#
|
||
|
|
||
|
if param compare SYS_LOGGER 0
|
||
|
then
|
||
|
sdlog2 start -r 100 -a -b 9 -t
|
||
|
else
|
||
|
set LOGGER_ARGS ""
|
||
|
|
||
|
if param compare SDLOG_MODE 1
|
||
|
then
|
||
|
set LOGGER_ARGS "-e"
|
||
|
fi
|
||
|
|
||
|
if param compare SDLOG_MODE 2
|
||
|
then
|
||
|
set LOGGER_ARGS "-f"
|
||
|
fi
|
||
|
|
||
|
if ver hwcmp AEROFC_V1
|
||
|
then
|
||
|
set LOGGER_ARGS "-m mavlink"
|
||
|
fi
|
||
|
|
||
|
logger start -b ${LOGGER_BUF} -t ${LOGGER_ARGS}
|
||
|
|
||
|
unset LOGGER_ARGS
|
||
|
fi
|
||
|
|
||
|
unset LOGGER_BUF
|