APM:Libraries
GCS_MAVLink.h
Go to the documentation of this file.
1 // -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*-
2 
5 
6 #ifndef GCS_MAVLink_h
7 #define GCS_MAVLink_h
8 
9 #include "compat.h"
10 
11 
12 #define MAVLINK_COMM_NUM_CHANNELS 1
13 #define MAVLINK_CRC_EXTRA 1
14 
15 #include "include/mavlink/v2.0/ardupilotmega/version.h"
16 
17 #include "include/mavlink/v2.0/mavlink_types.h"
18 
19 #undef MAVLINK_COMM_NUM_BUFFERS
20 #define MAVLINK_COMM_NUM_BUFFERS 1
21 
24 
27 
29 extern mavlink_system_t mavlink_system;
30 
31 extern void osd_queue(uint8_t c);
32 
38 static inline void comm_send_ch(mavlink_channel_t chan, uint8_t ch)
39 {
40  osd_queue(ch);
41 }
42 
48 static inline uint8_t comm_receive_ch(mavlink_channel_t chan)
49 {
50  return 0;
51 }
52 
57 static inline uint16_t comm_get_available(mavlink_channel_t chan)
58 {
59  return 0;
60 }
61 
62 
67 static inline int comm_get_txspace(mavlink_channel_t chan)
68 {
69  return 255;
70 }
71 
72 #pragma GCC diagnostic push
73 #pragma GCC diagnostic ignored "-Wcast-align" // yes I know
74 
75 
76 #define MAVLINK_USE_CONVENIENCE_FUNCTIONS
77 #include "include/mavlink/v2.0/ardupilotmega/mavlink.h"
78 
79 #pragma GCC diagnostic pop
80 
81 uint8_t mavlink_check_target(uint8_t sysid, uint8_t compid);
82 
83 // return a MAVLink variable type given a AP_Param type
84 uint8_t mav_var_type(enum ap_var_type t);
85 
86 #endif // GCS_MAVLink_h
ap_var_type
Definition: AP_Param.h:124
AP_HAL::AnalogSource * chan
Definition: AnalogIn.cpp:8