Skip to content
Snippets Groups Projects
Commit 4e012927 authored by Daniel Agar's avatar Daniel Agar Committed by Lorenz Meier
Browse files

new logger

parent eb29b336
No related branches found
No related tags found
No related merge requests found
Showing
with 130 additions and 45 deletions
#!nsh
#
# Initialize logging services.
#
if [ -d /fs/microsd ]
then
if ver hwcmp PX4FMU_V1
then
if sdlog2 start -r 30 -a -b 2 -t
then
fi
else
# check if we should increase logging rate for ekf2 replay message logging
if param greater EKF2_REC_RPL 0
then
if param compare SYS_LOGGER 0
then
if sdlog2 start -r 500 -e -b 20 -t
then
fi
else
if logger start -r 500
then
fi
fi
else
if param compare SYS_LOGGER 0
then
if sdlog2 start -r 100 -a -b 12 -t
then
fi
else
if logger start -b 32
then
fi
fi
fi
fi
fi
......@@ -617,32 +617,6 @@ then
mavlink start -r 800000 -d /dev/ttyACM0 -m config -x
fi
#
# Logging
#
if [ -d /fs/microsd ]
then
if ver hwcmp PX4FMU_V1
then
if sdlog2 start -r 30 -a -b 2 -t
then
fi
else
# 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 20 -t
then
fi
else
if sdlog2 start -r 100 -a -b 12 -t
then
fi
fi
fi
fi
#
# Start up ARDrone Motor interface
#
......@@ -863,6 +837,11 @@ then
echo "[i] No autostart ID found"
fi
#
# Logging
#
sh /etc/init.d/rc.logging
# Start any custom addons
set FEXTRAS /fs/microsd/etc/extras.txt
if [ -f $FEXTRAS ]
......
......@@ -26,6 +26,7 @@ find \
src/modules/gpio_led \
src/modules/land_detector \
src/modules/local_position_estimator \
src/modules/logger \
src/modules/mavlink/mavlink_tests \
src/modules/muorb \
src/modules/param \
......
......@@ -105,6 +105,7 @@ set(config_module_list
# Logging
#
modules/sdlog2
modules/logger
#
# Library modules
......
......@@ -91,6 +91,7 @@ set(config_module_list
# Logging
#
modules/sdlog2
modules/logger
#
# Library modules
......
......@@ -100,6 +100,7 @@ set(config_module_list
#
# Logging
#
modules/logger
modules/sdlog2
#
......
......@@ -99,6 +99,7 @@ set(config_module_list
# Logging
#
modules/sdlog2
modules/logger
#
# Library modules
......
......@@ -104,6 +104,7 @@ set(config_module_list
# Logging
#
modules/sdlog2
modules/logger
#
# Library modules
......
......@@ -27,6 +27,7 @@ set(config_module_list
modules/sensors
modules/dataman
modules/sdlog2
modules/logger
modules/simulator
modules/commander
modules/load_mon
......
......@@ -45,6 +45,7 @@ set(config_module_list
modules/sensors
modules/dataman
modules/sdlog2
modules/logger
modules/simulator
modules/commander
......
......@@ -31,6 +31,7 @@ set(config_module_list
modules/fw_pos_control_l1
modules/dataman
modules/sdlog2
modules/logger
modules/commander
modules/load_mon
lib/controllib
......
......@@ -40,6 +40,7 @@ set(config_module_list
modules/fw_pos_control_l1
modules/dataman
modules/sdlog2
modules/logger
modules/commander
modules/load_mon
lib/controllib
......
......@@ -38,6 +38,7 @@ set(config_module_list
modules/sensors
modules/dataman
modules/sdlog2
modules/logger
modules/simulator
modules/commander
modules/navigator
......
......@@ -49,6 +49,7 @@ set(config_module_list
modules/fw_pos_control_l1
modules/dataman
modules/sdlog2
modules/logger
modules/commander
lib/controllib
lib/mathlib
......
......@@ -40,6 +40,7 @@ set(config_module_list
modules/fw_pos_control_l1
modules/land_detector
modules/load_mon
modules/logger
modules/mavlink
modules/mc_att_control
modules/mc_att_control_multiplatform
......@@ -56,7 +57,6 @@ set(config_module_list
modules/systemlib/mixer
modules/uORB
modules/vtol_att_control
lib/controllib
lib/conversion
lib/DriverFramework/framework
......
......@@ -48,6 +48,7 @@ set(config_module_list
modules/fw_pos_control_l1
modules/dataman
modules/sdlog2
modules/logger
modules/commander
modules/load_mon
lib/controllib
......
......@@ -17,6 +17,7 @@ set(config_module_list
modules/ekf2
modules/ekf2_replay
modules/sdlog2
modules/logger
lib/controllib
lib/mathlib
lib/mathlib/math/filter
......
......@@ -40,6 +40,7 @@ set(config_module_list
modules/fw_pos_control_l1
modules/land_detector
modules/load_mon
modules/logger
modules/mavlink
modules/mc_att_control
modules/mc_att_control_multiplatform
......
......@@ -59,30 +59,29 @@ find_package(Eigen REQUIRED)
## Generate messages in the 'msg' folder
add_message_files(
FILES
rc_channels.msg
vehicle_attitude.msg
vehicle_attitude_setpoint.msg
manual_control_setpoint.msg
actuator_armed.msg
actuator_controls.msg
actuator_controls_0.msg
actuator_controls_virtual_mc.msg
vehicle_rates_setpoint.msg
commander_state.msg
control_state.msg
distance_sensor.msg
manual_control_setpoint.msg
mc_virtual_rates_setpoint.msg
vehicle_attitude.msg
vehicle_control_mode.msg
actuator_armed.msg
offboard_control_mode.msg
parameter_update.msg
vehicle_status.msg
commander_state.msg
vehicle_local_position.msg
position_setpoint.msg
position_setpoint_triplet.msg
vehicle_local_position_setpoint.msg
vehicle_global_velocity_setpoint.msg
offboard_control_mode.msg
rc_channels.msg
ros/actuator_controls_0.msg
ros/actuator_controls_virtual_mc.msg
vehicle_attitude.msg
vehicle_attitude_setpoint.msg
vehicle_control_mode.msg
vehicle_force_setpoint.msg
distance_sensor.msg
control_state.msg
vehicle_global_velocity_setpoint.msg
vehicle_local_position.msg
vehicle_local_position_setpoint.msg
vehicle_rates_setpoint.msg
vehicle_status.msg
)
## Generate services in the 'srv' folder
......
############################################################################
#
# Copyright (c) 2015 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
if (${OS} STREQUAL "nuttx")
list(APPEND MODULE_CFLAGS -Wframe-larger-than=2200)
endif()
px4_add_module(
MODULE modules__logger
MAIN logger
PRIORITY "SCHED_PRIORITY_MAX-30"
STACK_MAIN 2200
COMPILE_FLAGS
${MODULE_CFLAGS}
-Os
SRCS
logger.cpp
log_writer.cpp
DEPENDS
platforms__common
modules__uORB
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment