Beat Küng 71dcf8d619 sitl: use lockstep components API
- avoids the need for ekf2_timestamp publications by q and lpe
- adds logger to the lockstep cycle and makes it poll on ekf2_timestamps
  or vehicle_attitude. This avoids dropped samples (required for replay).
2020-06-23 11:53:55 -04:00

36 lines
815 B
Bash

#!/bin/sh
# Standard startup script for logging.
#
# NOTE: Script variables are declared/initialized/unset in the rcS script.
#
if param greater -s 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 "${LOGGER_ARGS} -e"
fi
if param compare SDLOG_MODE 2
then
set LOGGER_ARGS "${LOGGER_ARGS} -f"
fi
if param compare SDLOG_MODE 3
then
set LOGGER_ARGS "${LOGGER_ARGS} -x"
fi
if ! param compare SDLOG_MODE -1
then
logger start -b ${LOGGER_BUF} -t ${LOGGER_ARGS}
fi