forked from Archive/PX4-Autopilot
Merge pull request #1193 from PX4/dl_lost_fix
commander: only warn about lost link if link was working before
This commit is contained in:
commit
43855ac5a3
|
@ -1441,7 +1441,7 @@ int commander_thread_main(int argc, char *argv[])
|
||||||
/* data links check */
|
/* data links check */
|
||||||
bool have_link = false;
|
bool have_link = false;
|
||||||
for (int i = 0; i < TELEMETRY_STATUS_ORB_ID_NUM; i++) {
|
for (int i = 0; i < TELEMETRY_STATUS_ORB_ID_NUM; i++) {
|
||||||
if (hrt_elapsed_time(&telemetry_last_heartbeat[i]) < DL_TIMEOUT) {
|
if (telemetry_last_heartbeat[i] != 0 && hrt_elapsed_time(&telemetry_last_heartbeat[i]) < DL_TIMEOUT) {
|
||||||
/* handle the case where data link was regained */
|
/* handle the case where data link was regained */
|
||||||
if (telemetry_lost[i]) {
|
if (telemetry_lost[i]) {
|
||||||
mavlink_log_critical(mavlink_fd, "data link %i regained", i);
|
mavlink_log_critical(mavlink_fd, "data link %i regained", i);
|
||||||
|
|
Loading…
Reference in New Issue