Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rcS move logger startup to rc.logging and end of init #8904

Merged
merged 1 commit into from
Feb 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions ROMFS/px4fmu_common/init.d/rc.logging
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!nsh
# Logging
#
# Standard startup script for logging
#

if param compare SYS_LOGGER 0
then
sdlog2 start -r 100 -a -b 9 -t
else
set LOGGER_ARGS ""

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 ver hwcmp AEROFC_V1
then
set LOGGER_ARGS "-m mavlink"
fi

logger start -b ${LOGGER_BUF} -t ${LOGGER_ARGS}

unset LOGGER_ARGS
fi

unset LOGGER_BUF
32 changes: 2 additions & 30 deletions ROMFS/px4fmu_common/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -693,36 +693,6 @@ then
mavlink start -r 800000 -d /dev/ttyACM0 -m config -x
fi

#
# Logging
#
if param compare SYS_LOGGER 0
then
sdlog2 start -r 100 -a -b 9 -t
else
set LOGGER_ARGS ""

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 ver hwcmp AEROFC_V1
then
set LOGGER_ARGS "-m mavlink"
fi

logger start -b ${LOGGER_BUF} -t ${LOGGER_ARGS}

unset LOGGER_BUF
unset LOGGER_ARGS
fi

#
# Fixed wing setup
#
Expand Down Expand Up @@ -967,6 +937,8 @@ then
fi
fi

sh /etc/init.d/rc.logging

# End of autostart
fi

Expand Down