Skip to content

Commit

Permalink
Hook up receiving messages path
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzMeier committed Jun 7, 2014
1 parent 05b647d commit 4d85f0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/uas/QGCUASFileManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,16 @@ void QGCUASFileManager::nothingMessage()

void QGCUASFileManager::receiveMessage(LinkInterface* link, mavlink_message_t message)
{
emit statusMessage("msg");
Q_UNUSED(link);

if (message.msgid != MAVLINK_MSG_ID_ENCAPSULATED_DATA) {
emit statusMessage("not encap data");
// wtf, not for us
return;
}

emit statusMessage("msg");
qDebug() << "FTP GOT MESSAGE";

mavlink_encapsulated_data_t data;
mavlink_msg_encapsulated_data_decode(&message, &data);
const RequestHeader *hdr = (const RequestHeader *)&data.data[0];
Expand Down
2 changes: 2 additions & 0 deletions src/uas/UAS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ UAS::UAS(MAVLinkProtocol* protocol, QThread* thread, int id) : UASInterface(),
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.
// Basically everything exposed as a SLOT with no return value or arguments.

Expand Down

0 comments on commit 4d85f0b

Please sign in to comment.