Julian Oes 98857b4b94 ROMFS: don't check for UAVCAN_ENABLE param in SITL
This prevents a warning message being printed to SITL users because the
UAVCAN_ENABLE param does not exist.
2019-04-05 08:18:17 +02:00

34 lines
743 B
Bash

#!/bin/sh
# Standard startup script for logging.
#
# NOTE: Script variables are declared/initialized/unset in the rcS script.
#
if ! ver hwcmp PX4_SITL
then
if param greater UAVCAN_ENABLE 1
then
# Reduce logger buffer to free up some RAM for UAVCAN servers.
set LOGGER_BUF 6
fi
fi
###############################################################################
# End Setup for board specific configurations. #
###############################################################################
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 ! param compare SDLOG_MODE -1
then
logger start -b ${LOGGER_BUF} -t ${LOGGER_ARGS}
fi