Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
|
#include "nps_radio_control.h"
#include <glib.h>
#include <stdio.h>
#include <termios.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <inttypes.h>
Go to the source code of this file.
Macros | |
#define | IUCLC 0 |
#define | SYNC_1 0x03 |
#define | SYNC_2 0x12 |
#define | STA_UNINIT 0 |
#define | STA_GOT_SYNC_1 1 |
#define | STA_GOT_SYNC_2 2 |
#define | FRAME_LEN 14 |
#define | CHANNEL_OF_FRAME(i) ((((frame_buf[2*i]<<8) + frame_buf[2*i+1])&0x03FF)-512) |
Functions | |
static gboolean | on_serial_data_received (GIOChannel *source, GIOCondition condition, gpointer data) |
static void | parse_data (char *buf, int len) |
static void | handle_frame (void) |
int | nps_radio_control_spektrum_init (const char *device) |
Variables | |
static int | sp_fd |
uint8_t | status = STA_UNINIT |
static uint8_t | frame_buf [FRAME_LEN] |
static uint32_t | idx = 0 |
Definition at line 136 of file nps_radio_control_spektrum.c.
Referenced by handle_frame().
#define FRAME_LEN 14 |
Definition at line 100 of file nps_radio_control_spektrum.c.
Referenced by parse_data().
#define IUCLC 0 |
Definition at line 16 of file nps_radio_control_spektrum.c.
Referenced by nps_radio_control_spektrum_init().
#define STA_GOT_SYNC_1 1 |
Definition at line 95 of file nps_radio_control_spektrum.c.
Referenced by parse_data().
#define STA_GOT_SYNC_2 2 |
Definition at line 96 of file nps_radio_control_spektrum.c.
Referenced by parse_data().
#define STA_UNINIT 0 |
Definition at line 94 of file nps_radio_control_spektrum.c.
Referenced by parse_data().
#define SYNC_1 0x03 |
Definition at line 91 of file nps_radio_control_spektrum.c.
Referenced by parse_data().
#define SYNC_2 0x12 |
Definition at line 92 of file nps_radio_control_spektrum.c.
Referenced by parse_data().
|
static |
Definition at line 137 of file nps_radio_control_spektrum.c.
References CHANNEL_OF_FRAME, NpsRadioControl::mode, nps_radio_control, NpsRadioControl::pitch, NpsRadioControl::roll, NpsRadioControl::throttle, and NpsRadioControl::yaw.
Referenced by parse_data().
int nps_radio_control_spektrum_init | ( | const char * | device | ) |
Definition at line 28 of file nps_radio_control_spektrum.c.
References B115200, channel, IUCLC, on_serial_data_received(), and sp_fd.
Referenced by nps_radio_control_init().
|
static |
Definition at line 71 of file nps_radio_control_spektrum.c.
References parse_data(), and TRUE.
Referenced by nps_radio_control_spektrum_init().
|
static |
Definition at line 104 of file nps_radio_control_spektrum.c.
References FRAME_LEN, handle_frame(), idx, STA_GOT_SYNC_1, STA_GOT_SYNC_2, STA_UNINIT, SYNC_1, and SYNC_2.
Referenced by on_serial_data_received().
Definition at line 101 of file nps_radio_control_spektrum.c.
|
static |
Definition at line 102 of file nps_radio_control_spektrum.c.
Referenced by ahrs_switch(), attitude_ref_quat_float_idx_set_omega_p(), attitude_ref_quat_float_idx_set_omega_q(), attitude_ref_quat_float_idx_set_omega_r(), attitude_ref_quat_float_schedule(), chemo_periodic(), i2c_submit(), image_show_points(), ins_vectornav_read_message(), mavlink_common_message_handler(), mtostk_populate_float_array_from_buffer(), mtostk_populate_uuid_from_buffer(), parse_data(), spi_submit(), stabilization_attitude_gain_schedule(), and superbitrf_gen_dsmx_channels().
|
static |
Definition at line 19 of file nps_radio_control_spektrum.c.
Referenced by nps_radio_control_spektrum_init().
Definition at line 98 of file nps_radio_control_spektrum.c.