mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 12:58:52 +08:00
logger: do not write param changes if _should_stop_file_log is set
_should_stop_file_log is set after disarming: logging continues for 1s to measure the CPU usage. During that time, other modules might change params (such as ekf), and we don't need to have these the log. However currently all modules do not notify the system when setting params after disarming. Meaning this patch is not strictly needed, it's more a preventive measure.
This commit is contained in:
@@ -1005,9 +1005,10 @@ void Logger::run()
|
||||
bool data_written = false;
|
||||
|
||||
/* Check if parameters have changed */
|
||||
// this needs to change to a timestamped record to record a history of parameter changes
|
||||
if (parameter_update_sub.update()) {
|
||||
write_changed_parameters();
|
||||
if (!_should_stop_file_log) { // do not record param changes after disarming
|
||||
if (parameter_update_sub.update()) {
|
||||
write_changed_parameters();
|
||||
}
|
||||
}
|
||||
|
||||
/* wait for lock on log buffer */
|
||||
|
||||
Reference in New Issue
Block a user