forked from mavlink/c_uart_interface_example
-
Notifications
You must be signed in to change notification settings - Fork 7
/
mavlink_control.h
53 lines (39 loc) · 1.34 KB
/
mavlink_control.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/** This example is public domain. */
/**
* @file mavlink_control.h
*
* @brief The serial interface definition
*
* This process connects an external MAVLink UART device to send an receive data
*
* @author Trent Lukaczyk, <[email protected]>
* @author Jaycee Lock, <[email protected]>
*
*/
// ------------------------------------------------------------------------------
// Includes
// ------------------------------------------------------------------------------
#include <iostream>
#include <cstdlib>
#include <unistd.h>
#include <cmath>
#include <string.h>
#include <inttypes.h>
#include <fstream>
#include <signal.h>
using std::string;
using namespace std;
#include <common/mavlink.h>
// ------------------------------------------------------------------------------
// Prototypes
// ------------------------------------------------------------------------------
int main(int argc, char **argv);
int top(int argc, char **argv);
int read_message();
int write_message(float x, float y, float z, float yaw);
void parse_commandline(int argc, char **argv, char *&uart_name, int &baudrate);
void quit_handler(int sig);
// ------------------------------------------------------------------------------
// Loop control flags
// ------------------------------------------------------------------------------
int CMD_STREAM_FLAG = 1;