Commit 4d85f0b5 authored by Lorenz Meier's avatar Lorenz Meier

Hook up receiving messages path

parent 05b647d4
...@@ -76,14 +76,16 @@ void QGCUASFileManager::nothingMessage() ...@@ -76,14 +76,16 @@ void QGCUASFileManager::nothingMessage()
void QGCUASFileManager::receiveMessage(LinkInterface* link, mavlink_message_t message) void QGCUASFileManager::receiveMessage(LinkInterface* link, mavlink_message_t message)
{ {
emit statusMessage("msg"); Q_UNUSED(link);
if (message.msgid != MAVLINK_MSG_ID_ENCAPSULATED_DATA) { if (message.msgid != MAVLINK_MSG_ID_ENCAPSULATED_DATA) {
emit statusMessage("not encap data");
// wtf, not for us // wtf, not for us
return; return;
} }
emit statusMessage("msg");
qDebug() << "FTP GOT MESSAGE";
mavlink_encapsulated_data_t data; mavlink_encapsulated_data_t data;
mavlink_msg_encapsulated_data_decode(&message, &data); mavlink_msg_encapsulated_data_decode(&message, &data);
const RequestHeader *hdr = (const RequestHeader *)&data.data[0]; const RequestHeader *hdr = (const RequestHeader *)&data.data[0];
......
...@@ -176,6 +176,8 @@ UAS::UAS(MAVLinkProtocol* protocol, QThread* thread, int id) : UASInterface(), ...@@ -176,6 +176,8 @@ UAS::UAS(MAVLinkProtocol* protocol, QThread* thread, int id) : UASInterface(),
componentMulti[i] = false; componentMulti[i] = false;
} }
connect(mavlink, SIGNAL(messageReceived(LinkInterface*,mavlink_message_t)), &fileManager, SLOT(receiveMessage(LinkInterface*,mavlink_message_t)));
// Store a list of available actions for this UAS. // Store a list of available actions for this UAS.
// Basically everything exposed as a SLOT with no return value or arguments. // Basically everything exposed as a SLOT with no return value or arguments.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment