Beat Küng 5c715978e8 param compare/greater: do not print 'parameter not found' message
Reduces clutter in the boot output (now that we have it in the log).
On omnibus for example we see:
ERROR [param] Parameter SENS_EN_BATT not found
ERROR [param] Parameter SENS_EN_LL40LS not found
ERROR [param] Parameter SENS_EN_LL40LS not found
ERROR [param] Parameter SENS_EN_MB12XX not found
ERROR [param] Parameter SENS_EN_PGA460 not found
ERROR [param] Parameter SENS_EN_SF1XX not found
ERROR [param] Parameter SENS_EN_TRANGER not found
2019-06-06 09:16:49 -04:00

36 lines
767 B
Bash

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