Files
bizhang_-obav/ROMFS/px4fmu_common/init.d/rc.logging

46 lines
1.0 KiB
Plaintext
Raw Normal View History

#!nsh
# Standard startup script for logging.
#
# NOTE: Script variables are declared/initialized/unset in the rcS script.
#
2018-07-12 17:21:18 -04:00
set LOGGER_ARGS ""
if param greater UAVCAN_ENABLE 1
then
# Reduce logger buffer to free up some RAM for UAVCAN servers.
set LOGGER_BUF 6
fi
###############################################################################
# Begin Setup for board specific configurations. #
###############################################################################
if ver hwcmp AV_X_V1
then
set LOGGER_BUF 64
fi
###############################################################################
# End Setup for board specific configurations. #
###############################################################################
2018-07-12 17:21:18 -04:00
if param compare SDLOG_MODE 1
then
set LOGGER_ARGS "-e"
fi
2018-07-12 17:21:18 -04:00
if param compare SDLOG_MODE 2
then
set LOGGER_ARGS "-f"
fi
if ver hwcmp INTEL_AEROFC_V1
2018-07-12 17:21:18 -04:00
then
set LOGGER_ARGS "-m mavlink"
fi
2018-07-12 17:21:18 -04:00
logger start -b ${LOGGER_BUF} -t ${LOGGER_ARGS}
unset LOGGER_ARGS