Browse Source

UAS: Simplifies logic

http://www.wolframalpha.com/input/?i=!s+%7C%7C+(s+%26%26+a)

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
QGC4.4
Patrick José Pereira 7 years ago
parent
commit
7d2cbff1cf
  1. 2
      src/uas/UAS.cc

2
src/uas/UAS.cc

@ -184,7 +184,7 @@ void UAS::receiveMessage(mavlink_message_t message) @@ -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;

Loading…
Cancel
Save