SlugsMAV.cc 637 Bytes
Newer Older
1 2
#include "SlugsMAV.h"

3 4
#include <QDebug>

5 6 7 8 9 10 11 12 13
SlugsMAV::SlugsMAV(MAVLinkProtocol* mavlink, int id) :
        UAS(mavlink, id)//,
        // Place other initializers here
{
}


void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
{
14 15 16 17
    // Let UAS handle the default message set
    UAS::receiveMessage(link, message);

    // Handle your special messages
18 19 20 21
    switch (message.msgid)
    {
    case MAVLINK_MSG_ID_HEARTBEAT:
        {
22
            qDebug() << "RECEIVED HEARTBEAT";
23 24 25
            break;
        }
    default:
26
        qDebug() << "\nSLUGS RECEIVED MESSAGE WITH ID" << message.msgid;
27 28 29
        break;
    }
}