From d28aa046835e7d0883eea7768e30b5027f5427c7 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Wed, 5 Sep 2012 16:05:55 +0200 Subject: [PATCH] Minor polishing on error messages and fixed link outage time announcement --- src/uas/UAS.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index 1ed33ae00..dbb342518 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -204,11 +204,16 @@ void UAS::updateState() emit heartbeatTimeout(heartbeatInterval); emit heartbeatTimeout(); connectionLost = true; - connectionLossTime = heartbeatInterval; QString audiostring = QString("Link lost to system %1").arg(this->getUASID()); GAudioOutput::instance()->say(audiostring.toLower()); } + // Update connection loss time on each iteration + if (connectionLost && (heartbeatInterval > timeoutIntervalHeartbeat)) + { + connectionLossTime = heartbeatInterval; + } + // Connection gained if (connectionLost && (heartbeatInterval < timeoutIntervalHeartbeat)) { @@ -1182,6 +1187,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) case MAVLINK_MSG_ID_NAMED_VALUE_FLOAT: case MAVLINK_MSG_ID_NAMED_VALUE_INT: case MAVLINK_MSG_ID_MANUAL_CONTROL: + case MAVLINK_MSG_ID_HIGHRES_IMU: break; default: { -- 2.22.0