logger: add high rate & debug profiles

This commit is contained in:
Beat Küng 2017-10-14 09:21:34 +02:00 committed by Lorenz Meier
parent 07ae1e4044
commit be6079bc52
3 changed files with 34 additions and 2 deletions

View File

@ -580,6 +580,24 @@ void Logger::add_common_topics()
add_topic("wind_estimate", 200);
}
void Logger::add_high_rate_topics()
{
// maximum rate to analyze fast maneuvers (e.g. for racing)
add_topic("actuator_controls_0");
add_topic("actuator_outputs");
add_topic("manual_control_setpoint");
add_topic("vehicle_attitude");
add_topic("vehicle_attitude_setpoint");
add_topic("vehicle_rates_setpoint");
}
void Logger::add_debug_topics()
{
add_topic("debug_key_value");
add_topic("debug_value");
add_topic("debug_vect");
}
void Logger::add_estimator_replay_topics()
{
// for estimator replay (need to be at full rate)
@ -601,7 +619,6 @@ void Logger::add_estimator_replay_topics()
void Logger::add_thermal_calibration_topics()
{
// Note: try to avoid setting the interval where possible, as it increases RAM usage
add_topic("sensor_accel", 100);
add_topic("sensor_baro", 100);
add_topic("sensor_gyro", 100);
@ -741,6 +758,15 @@ void Logger::run()
add_common_topics();
add_system_identification_topics();
} else if (sdlog_profile == SDLogProfile::HIGH_RATE) {
add_common_topics();
add_estimator_replay_topics();
add_high_rate_topics();
} else if (sdlog_profile == SDLogProfile::DEBUG_TOPICS) {
add_common_topics();
add_debug_topics();
} else {
add_common_topics();
add_estimator_replay_topics();

View File

@ -65,6 +65,8 @@ enum class SDLogProfile : int32_t {
DEFAULT = 0,
THERMAL_CALIBRATION,
SYSTEM_IDENTIFICATION,
HIGH_RATE,
DEBUG_TOPICS,
N_PROFILES
};
@ -270,6 +272,8 @@ private:
void add_estimator_replay_topics();
void add_thermal_calibration_topics();
void add_system_identification_topics();
void add_high_rate_topics();
void add_debug_topics();
void ack_vehicle_command(orb_advert_t &vehicle_command_ack_pub, vehicle_command_s *cmd, uint32_t result);

View File

@ -78,9 +78,11 @@ PARAM_DEFINE_INT32(SDLOG_MODE, 0);
* @value 0 default
* @value 1 thermal calibration
* @value 2 system identification
* @value 3 high rate
* @value 4 debug topics
*
* @min 0
* @max 2
* @max 4
* @reboot_required true
* @group SD Logging
*/