mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 10:41:36 +08:00
logger: fix TSAN issue
This commit is contained in:
@@ -1134,7 +1134,7 @@ bool Logger::start_stop_logging()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
desired_state = desired_state || _manually_logging_override;
|
desired_state = desired_state || _manually_logging_override.load();
|
||||||
|
|
||||||
// only start/stop if this is a state transition
|
// only start/stop if this is a state transition
|
||||||
if (updated && _prev_file_log_start_state != desired_state) {
|
if (updated && _prev_file_log_start_state != desired_state) {
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ public:
|
|||||||
|
|
||||||
void print_statistics(LogType type);
|
void print_statistics(LogType type);
|
||||||
|
|
||||||
void set_arm_override(bool override) { _manually_logging_override = override; }
|
void set_arm_override(bool override) { _manually_logging_override.store(override); }
|
||||||
|
|
||||||
void trigger_watchdog_now()
|
void trigger_watchdog_now()
|
||||||
{
|
{
|
||||||
@@ -345,7 +345,7 @@ private:
|
|||||||
LogFileName _file_name[(int)LogType::Count];
|
LogFileName _file_name[(int)LogType::Count];
|
||||||
|
|
||||||
bool _prev_file_log_start_state{false}; ///< previous state depending on logging mode (arming or aux1 state)
|
bool _prev_file_log_start_state{false}; ///< previous state depending on logging mode (arming or aux1 state)
|
||||||
bool _manually_logging_override{false};
|
px4::atomic_bool _manually_logging_override{false};
|
||||||
|
|
||||||
Statistics _statistics[(int)LogType::Count];
|
Statistics _statistics[(int)LogType::Count];
|
||||||
hrt_abstime _last_sync_time{0}; ///< last time a sync msg was sent
|
hrt_abstime _last_sync_time{0}; ///< last time a sync msg was sent
|
||||||
|
|||||||
Reference in New Issue
Block a user