mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-05 21:23:58 -04:00
mavlink: make it possible to build with mavlink 1.0 headers
This commit is contained in:
parent
7cc396bd83
commit
de7cf3d1db
@ -11,7 +11,11 @@ BetterStream *mavlink_comm_1_port;
|
|||||||
// this might need to move to the flight software
|
// this might need to move to the flight software
|
||||||
mavlink_system_t mavlink_system = {7,1,0,0};
|
mavlink_system_t mavlink_system = {7,1,0,0};
|
||||||
|
|
||||||
#include "include/mavlink_helpers.h"
|
#ifdef MAVLINK10
|
||||||
|
# include "include_v1.0/mavlink_helpers.h"
|
||||||
|
#else
|
||||||
|
# include "include/mavlink_helpers.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
uint8_t mavlink_check_target(uint8_t sysid, uint8_t compid)
|
uint8_t mavlink_check_target(uint8_t sysid, uint8_t compid)
|
||||||
{
|
{
|
||||||
|
@ -10,13 +10,21 @@
|
|||||||
|
|
||||||
#define MAVLINK_SEPARATE_HELPERS
|
#define MAVLINK_SEPARATE_HELPERS
|
||||||
|
|
||||||
#include "include/ardupilotmega/version.h"
|
#ifdef MAVLINK10
|
||||||
|
# include "include_v1.0/ardupilotmega/version.h"
|
||||||
|
#else
|
||||||
|
# include "include/ardupilotmega/version.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// this allows us to make mavlink_message_t much smaller
|
// this allows us to make mavlink_message_t much smaller
|
||||||
#define MAVLINK_MAX_PAYLOAD_LEN MAVLINK_MAX_DIALECT_PAYLOAD_SIZE
|
#define MAVLINK_MAX_PAYLOAD_LEN MAVLINK_MAX_DIALECT_PAYLOAD_SIZE
|
||||||
|
|
||||||
#define MAVLINK_COMM_NUM_BUFFERS 2
|
#define MAVLINK_COMM_NUM_BUFFERS 2
|
||||||
#include "include/mavlink_types.h"
|
#ifdef MAVLINK10
|
||||||
|
# include "include_v1.0/mavlink_types.h"
|
||||||
|
#else
|
||||||
|
# include "include/mavlink_types.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/// MAVLink stream used for HIL interaction
|
/// MAVLink stream used for HIL interaction
|
||||||
extern BetterStream *mavlink_comm_0_port;
|
extern BetterStream *mavlink_comm_0_port;
|
||||||
@ -109,7 +117,11 @@ static inline int comm_get_txspace(mavlink_channel_t chan)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
#define MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||||
#include "include/ardupilotmega/mavlink.h"
|
#ifdef MAVLINK10
|
||||||
|
# include "include_v1.0/ardupilotmega/mavlink.h"
|
||||||
|
#else
|
||||||
|
# include "include/ardupilotmega/mavlink.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
uint8_t mavlink_check_target(uint8_t sysid, uint8_t compid);
|
uint8_t mavlink_check_target(uint8_t sysid, uint8_t compid);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user