mavlink: correctly lock radio status

- hrt_elapsed_time_atomic is not atomic on posix
- other fields like _radio_status_mult need protection as well
This commit is contained in:
Beat Küng
2021-09-23 09:23:08 +02:00
parent 0bfb1a983b
commit 6f902e54f9
3 changed files with 18 additions and 3 deletions
+1 -1
View File
@@ -1518,7 +1518,7 @@ MavlinkReceiver::handle_message_radio_status(mavlink_message_t *msg)
radio_status_s status{};
hrt_store_absolute_time(&status.timestamp);
status.timestamp = hrt_absolute_time();
status.rssi = rstatus.rssi;
status.remote_rssi = rstatus.remrssi;
status.txbuf = rstatus.txbuf;