From 7d2cbff1cfc7f947ecc3691793ee47ac5876eb30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Wed, 2 May 2018 11:51:12 -0300 Subject: [PATCH] UAS: Simplifies logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit http://www.wolframalpha.com/input/?i=!s+%7C%7C+(s+%26%26+a) Signed-off-by: Patrick José Pereira --- src/uas/UAS.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index 1258ead86..9663774cb 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -184,7 +184,7 @@ void UAS::receiveMessage(mavlink_message_t message) // Only accept messages from this system (condition 1) // and only then if a) attitudeStamped is disabled OR b) attitudeStamped is enabled // and we already got one attitude packet - if (message.sysid == uasId && (!attitudeStamped || (attitudeStamped && (lastAttitude != 0)) || message.msgid == MAVLINK_MSG_ID_ATTITUDE)) + if (message.sysid == uasId && (!attitudeStamped || lastAttitude != 0 || message.msgid == MAVLINK_MSG_ID_ATTITUDE)) { QString uasState; QString stateDescription; -- 2.22.0