From eb5b153d1039da2af9a05ff923a185274fa7b19d Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 9 Jul 2017 13:52:50 +0200 Subject: [PATCH] MAVLink app: send status text only if connected to something that can actually handle it. This increases the chance that the operator gets to see the messages that the vehicle emitted before telemetry was connected. --- src/modules/mavlink/mavlink_messages.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/mavlink/mavlink_messages.cpp b/src/modules/mavlink/mavlink_messages.cpp index dbc9f5eb1e..53c3a814e7 100644 --- a/src/modules/mavlink/mavlink_messages.cpp +++ b/src/modules/mavlink/mavlink_messages.cpp @@ -385,7 +385,7 @@ protected: void send(const hrt_abstime t) { - if (!_mavlink->get_logbuffer()->empty()) { + if (!_mavlink->get_logbuffer()->empty() && _mavlink->is_connected()) { struct mavlink_log_s mavlink_log = {};