mavlink: update radio status timestamp atomically

- this is updated by the mavlink rx thread, but checked in the tx thread
This commit is contained in:
Daniel Agar
2021-08-23 11:16:10 -04:00
parent 61702d0d97
commit a4527485a3
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1457,7 +1457,7 @@ Mavlink::update_rate_mult()
} else if (_radio_status_available) {
// check for RADIO_STATUS timeout and reset
if (hrt_elapsed_time(&_rstatus.timestamp) > (_param_mav_radio_timeout.get() * 1_s)) {
if (hrt_elapsed_time_atomic(&_rstatus.timestamp) > (_param_mav_radio_timeout.get() * 1_s)) {
PX4_ERR("instance %d: RADIO_STATUS timeout", _instance_id);
_radio_status_available = false;