Skip to content
QGCMAVLink.h 1.5 KiB
Newer Older
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/
pixhawk's avatar
pixhawk committed

#pragma once
pixhawk's avatar
pixhawk committed

DonLakeFlyer's avatar
 
DonLakeFlyer committed
#include <QString>

#define MAVLINK_USE_MESSAGE_INFO
#define MAVLINK_EXTERNAL_RX_STATUS  // Single m_mavlink_status instance is in QGCApplication.cc
#include <stddef.h>                 // Hack workaround for Mav 2.0 header problem with respect to offsetof usage

// Ignore warnings from mavlink headers for both GCC/Clang and MSVC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#endif

#pragma warning(push, 0)
#include <mavlink_types.h>
extern mavlink_status_t m_mavlink_status[MAVLINK_COMM_NUM_BUFFERS];
#pragma GCC diagnostic pop
#pragma warning(pop, 0)
Don Gagne's avatar
Don Gagne committed
class QGCMAVLink {
public:
DonLakeFlyer's avatar
 
DonLakeFlyer committed
    static bool     isFixedWing         (MAV_TYPE mavType);
    static bool     isRover             (MAV_TYPE mavType);
    static bool     isSub               (MAV_TYPE mavType);
    static bool     isMultiRotor        (MAV_TYPE mavType);
    static bool     isVTOL              (MAV_TYPE mavType);
    static QString  mavResultToString   (MAV_RESULT result);