PX4 Firmware
PX4 Autopilot Software http://px4.io
simulator_mavlink.cpp File Reference
#include <termios.h>
#include <px4_platform_common/log.h>
#include <px4_platform_common/time.h>
#include <px4_platform_common/tasks.h>
#include "simulator.h"
#include <simulator_config.h>
#include "errno.h"
#include <lib/ecl/geo/geo.h>
#include <drivers/drv_pwm_output.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <pthread.h>
#include <conversion/rotation.h>
#include <mathlib/mathlib.h>
#include <limits>
Include dependency graph for simulator_mavlink.cpp:

Go to the source code of this file.

Functions

static void fill_rc_input_msg (input_rc_s *rc, mavlink_rc_channels_t *rc_channels)
 

Variables

static int _fd
 
static unsigned char _buf [2048]
 
static sockaddr_in _srcaddr
 
static unsigned _addrlen = sizeof(_srcaddr)
 
const unsigned mode_flag_armed = 128
 
const unsigned mode_flag_custom = 1
 

Function Documentation

◆ fill_rc_input_msg()

static void fill_rc_input_msg ( input_rc_s rc,
mavlink_rc_channels_t *  rc_channels 
)
static

Definition at line 195 of file simulator_mavlink.cpp.

References input_rc_s::channel_count, hrt_absolute_time(), input_rc_s::rssi, input_rc_s::timestamp, input_rc_s::timestamp_last_signal, and input_rc_s::values.

Referenced by Simulator::handle_message_rc_channels().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ _addrlen

unsigned _addrlen = sizeof(_srcaddr)
static

Definition at line 69 of file simulator_mavlink.cpp.

Referenced by Simulator::poll_for_MAVLink_messages().

◆ _buf

◆ _fd

◆ _srcaddr

sockaddr_in _srcaddr
static

◆ mode_flag_armed

const unsigned mode_flag_armed = 128

Definition at line 71 of file simulator_mavlink.cpp.

Referenced by Simulator::actuator_controls_from_outputs().

◆ mode_flag_custom

const unsigned mode_flag_custom = 1

Definition at line 72 of file simulator_mavlink.cpp.

Referenced by Simulator::actuator_controls_from_outputs().