PX4 Firmware
PX4 Autopilot Software http://px4.io
|
MAVLink 1.0 protocol implementation. More...
#include <termios.h>
#include <lib/ecl/geo/geo.h>
#include <lib/mathlib/mathlib.h>
#include <lib/version/version.h>
#include <uORB/PublicationQueued.hpp>
#include "mavlink_receiver.h"
#include "mavlink_main.h"
Go to the source code of this file.
Macros | |
#define | MAVLINK_NET_ADDED_STACK 0 |
#define | FLOW_CONTROL_DISABLE_THRESHOLD 40 |
picked so that some messages still would fit it. More... | |
#define | MAX_DATA_RATE 10000000 |
max data rate in bytes/s More... | |
#define | MAIN_LOOP_DELAY 10000 |
100 Hz @ 1000 bytes/s data rate More... | |
#define | B460800 460800 |
#define | B500000 500000 |
#define | B921600 921600 |
#define | B1000000 1000000 |
Functions | |
__EXPORT int | mavlink_main (int argc, char *argv[]) |
Mavlink app start / stop handling function. More... | |
void | mavlink_send_uart_bytes (mavlink_channel_t chan, const uint8_t *ch, int length) |
Send multiple chars (uint8_t) over a comm channel. More... | |
void | mavlink_start_uart_send (mavlink_channel_t chan, int length) |
void | mavlink_end_uart_send (mavlink_channel_t chan, int length) |
mavlink_status_t * | mavlink_get_channel_status (uint8_t channel) |
mavlink_message_t * | mavlink_get_channel_buffer (uint8_t channel) |
static void | usage () |
Variables | |
static Mavlink * | _mavlink_instances = nullptr |
MAVLink 1.0 protocol implementation.
Definition in file mavlink_main.cpp.
#define B1000000 1000000 |
Referenced by Mavlink::mavlink_open_uart().
#define B460800 460800 |
#define B500000 500000 |
Referenced by Mavlink::mavlink_open_uart().
#define B921600 921600 |
Referenced by Mavlink::mavlink_open_uart(), and Simulator::poll_for_MAVLink_messages().
#define FLOW_CONTROL_DISABLE_THRESHOLD 40 |
picked so that some messages still would fit it.
Definition at line 75 of file mavlink_main.cpp.
Referenced by Mavlink::get_free_tx_buf().
#define MAIN_LOOP_DELAY 10000 |
100 Hz @ 1000 bytes/s data rate
Definition at line 77 of file mavlink_main.cpp.
Referenced by Mavlink::configure_stream_threadsafe(), and Mavlink::task_main().
#define MAVLINK_NET_ADDED_STACK 0 |
Definition at line 72 of file mavlink_main.cpp.
Referenced by Mavlink::start().
#define MAX_DATA_RATE 10000000 |
max data rate in bytes/s
Definition at line 76 of file mavlink_main.cpp.
Referenced by Mavlink::task_main().
void mavlink_end_uart_send | ( | mavlink_channel_t | chan, |
int | length | ||
) |
Definition at line 116 of file mavlink_main.cpp.
References Mavlink::get_instance(), and Mavlink::send_packet().
mavlink_message_t* mavlink_get_channel_buffer | ( | uint8_t | channel | ) |
Definition at line 146 of file mavlink_main.cpp.
References Mavlink::_boot_complete, Mavlink::_first_start_time, Mavlink::get_buffer(), Mavlink::get_instance(), hrt_abstime, and usage().
mavlink_status_t* mavlink_get_channel_status | ( | uint8_t | channel | ) |
Definition at line 131 of file mavlink_main.cpp.
References Mavlink::get_instance(), and Mavlink::get_status().
int mavlink_main | ( | int | argc, |
char * | argv[] | ||
) |
Mavlink app start / stop handling function.
Definition at line 3087 of file mavlink_main.cpp.
References Mavlink::destroy_all_instances(), Mavlink::get_status_all_instances(), Mavlink::set_boot_complete(), Mavlink::start(), Mavlink::stream_command(), and usage().
void mavlink_send_uart_bytes | ( | mavlink_channel_t | chan, |
const uint8_t * | ch, | ||
int | length | ||
) |
Send multiple chars (uint8_t) over a comm channel.
chan | MAVLink channel to use, usually MAVLINK_COMM_0 = UART0 |
ch | Character to send |
Definition at line 88 of file mavlink_main.cpp.
References Mavlink::get_instance(), and Mavlink::send_bytes().
void mavlink_start_uart_send | ( | mavlink_channel_t | chan, |
int | length | ||
) |
Definition at line 104 of file mavlink_main.cpp.
References Mavlink::begin_send(), and Mavlink::get_instance().
|
static |
Definition at line 3014 of file mavlink_main.cpp.
References f().
Referenced by mavlink_get_channel_buffer(), mavlink_main(), Mavlink::stream_command(), and Mavlink::task_main().
|
static |
Definition at line 79 of file mavlink_main.cpp.
Referenced by Mavlink::destroy_all_instances(), Mavlink::get_status_all_instances(), and Mavlink::serial_instance_exists().