QGCMAVLink.h 1.46 KB
Newer Older
1 2
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
3
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4 5 6 7 8
 *
 * 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
9 10 11 12 13 14 15 16


/**
 * @file
 *   @brief MAVLink header file for QGroundControl
 *   @author Lorenz Meier <pixhawk@switched.com>
 */

17
#pragma once
pixhawk's avatar
pixhawk committed
18

19 20 21
#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
22 23

// Ignore warnings from mavlink headers for both GCC/Clang and MSVC
24
#ifdef __GNUC__
25 26

#if __GNUC__ > 8
27 28
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
29 30 31 32 33
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wall"
#endif

34
#else
35
#pragma warning(push, 0)
36
#endif
37

38 39
#include <mavlink_types.h>
extern mavlink_status_t m_mavlink_status[MAVLINK_COMM_NUM_BUFFERS];
40
#include <mavlink.h>
41

42
#ifdef __GNUC__
43
#pragma GCC diagnostic pop
44
#else
45
#pragma warning(pop, 0)
46
#endif
47

Don Gagne's avatar
Don Gagne committed
48 49 50 51 52 53 54 55 56
class QGCMAVLink {
public:
    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);
};

57