logger: add high rate & debug profiles

This commit is contained in:
Beat Küng
2017-10-14 14:21:11 +02:00
committed by Lorenz Meier
parent 07ae1e4044
commit be6079bc52
3 changed files with 34 additions and 2 deletions
+27 -1
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();