logger params: add SDLOG_MODE to select when to start & stop logging

This commit is contained in:
Beat Küng
2016-11-15 15:41:31 +01:00
committed by Lorenz Meier
parent 983cfb8fdd
commit 9301e9cc50
2 changed files with 35 additions and 12 deletions

View File

@@ -658,30 +658,34 @@ then
then
fi
else
# check if we should increase logging rate for ekf2 replay message logging
if param greater EKF2_REC_RPL 0
if param compare SYS_LOGGER 0
then
if param compare SYS_LOGGER 0
# check if we should increase logging rate for ekf2 replay message logging
if param greater EKF2_REC_RPL 0
then
if sdlog2 start -r 500 -e -b 18 -t
then
fi
else
if logger start -r 500
if sdlog2 start -r 100 -a -b 9 -t
then
fi
fi
else
if param compare SYS_LOGGER 0
set LOGGER_ARGS ""
if param compare SDLOG_MODE 1
then
if sdlog2 start -r 100 -a -b 9 -t
then
fi
else
if logger start -b 12 -t
then
fi
set LOGGER_ARGS "-e"
fi
if param compare SDLOG_MODE 2
then
set LOGGER_ARGS "-f"
fi
if logger start -b 12 -t $LOGGER_ARGS
then
fi
unset LOGGER_ARGS
fi
fi