diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index e932005e3c1673ccda2be0b3acdfbebd737f16a5..142e53b20f0ad443f67dcb71dcb42bc02d47f673 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -1532,15 +1532,8 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) { unknownPackets.append(message.msgid); - // XXX Do NOT show this to users, as they will attribute - // completely random problems to this message and won't - // even bother to look up what the message actually is. - -// QString errString = tr("UNABLE TO DECODE MESSAGE NUMBER %1").arg(message.msgid); -// //GAudioOutput::instance()->say(errString+tr(", please check console for details.")); -// emit textMessageReceived(uasId, message.compid, 255, errString); -// std::cout << "Unable to decode message from system " << std::dec << static_cast(message.sysid) << " with message id:" << static_cast(message.msgid) << std::endl; -// //qDebug() << std::cerr << "Unable to decode message from system " << std::dec << static_cast(message.acid) << " with message id:" << static_cast(message.msgid) << std::endl; + emit unknownPacketReceived(uasId, message.compid, message.msgid); + qWarning() << "Unknown message from system:" << uasId << "message:" << message.msgid; } } break; diff --git a/src/uas/UASInterface.h b/src/uas/UASInterface.h index 127a51fb135f78b00334f8efb3ceccb7456b4629..37382e3eb4197f0e077298bace9698f52549d6a1 100644 --- a/src/uas/UASInterface.h +++ b/src/uas/UASInterface.h @@ -643,6 +643,9 @@ signals: // HOME POSITION / ORIGIN CHANGES void homePositionChanged(int uas, double lat, double lon, double alt); + /** @brief The system received an unknown message, which it could not interpret */ + void unknownPacketReceived(int uas, int component, int messageid); + protected: // TIMEOUT CONSTANTS