From 61ca65d863b7fd30604e57cc88b97bb567cc1329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Mi=C5=A1i=C4=87?= Date: Wed, 15 Feb 2023 10:58:06 +0100 Subject: [PATCH] mavlink: use high_latency_data_link_lost as backup to normal data_link --- msg/IridiumsbdStatus.msg | 2 +- src/modules/commander/Commander.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/msg/IridiumsbdStatus.msg b/msg/IridiumsbdStatus.msg index 14ea1d30a5..436654e4ff 100644 --- a/msg/IridiumsbdStatus.msg +++ b/msg/IridiumsbdStatus.msg @@ -1,5 +1,5 @@ uint64 timestamp # time since system start (microseconds) -uint64 last_successful_at_cmd # timestamp of the last successful AT command +uint64 last_at_ok_timestamp # timestamp of the last "OK" received after the "AT" command uint16 tx_buf_write_index # current size of the tx buffer uint16 rx_buf_read_index # the rx buffer is parsed up to that index uint16 rx_buf_end_index # current size of the rx buffer diff --git a/src/modules/commander/Commander.cpp b/src/modules/commander/Commander.cpp index f7ac58e961..8efd9b1bba 100644 --- a/src/modules/commander/Commander.cpp +++ b/src/modules/commander/Commander.cpp @@ -2676,7 +2676,7 @@ void Commander::dataLinkCheck() iridiumsbd_status_s iridium_status; if (_iridiumsbd_status_sub.update(&iridium_status)) { - _high_latency_datalink_timestamp = iridium_status.last_successful_at_cmd; + _high_latency_datalink_timestamp = iridium_status.last_at_ok_timestamp; if (_vehicle_status.high_latency_data_link_lost && (_high_latency_datalink_timestamp > _high_latency_datalink_lost) &&