Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the source code of this file.
Data Structures | |
struct | spektrum_sat_t |
struct | spektrum_t |
Macros | |
#define | SPEKTRUM_SATELLITES_NB 2 |
#define | SPEKTRUM_FRAME_LEN 16 |
16 bytes in a standard frame More... | |
#define | SPEKTRUM_CHANNELS_PER_FRAME 7 |
Maximum amount of RC channels per frame. More... | |
#define | SPEKTRUM_MAX_FRAMES 2 |
Maximum amount of RC frames containing different channels. More... | |
#define | SPEKTRUM_MAX_CHANNELS (SPEKTRUM_CHANNELS_PER_FRAME * SPEKTRUM_MAX_FRAMES) |
#define | SPEKTRUM_MIN_FRAME_SPACE 7 |
Minum amount of time between frames (7ms), in fact either 11 or 22 ms. More... | |
#define | RadioControlEvent(_received_frame_handler) spektrum_event(_received_frame_handler) |
Functions | |
void | spektrum_event (void(*_received_frame_handler)(void)) |
Checks if there is one valid satellite and sets the radio_control structure. More... | |
void | spektrum_try_bind (void) |
Radio control spektrum interface.
Definition in file spektrum.h.
struct spektrum_sat_t |
Definition at line 51 of file spektrum.h.
Data Fields | ||
---|---|---|
uint8_t | buf[SPEKTRUM_FRAME_LEN] | input buffer |
uint8_t | idx | input buffer index |
uint8_t | lost_frame_cnt | Amount of RC frames lost. |
uint32_t | timer | Timer to keep track of the UART synchronisation. |
bool | valid | True when we received a packet else false. |
int16_t | values[SPEKTRUM_MAX_CHANNELS] | RC channel values. |
struct spektrum_t |
Definition at line 61 of file spektrum.h.
Data Fields | ||
---|---|---|
struct spektrum_sat_t | satellites[SPEKTRUM_SATELLITES_NB] | All the satellites connected. |
int8_t | signs[RADIO_CONTROL_NB_CHANNEL] | Signs for the RC channels. |
uint8_t | tx_type | Transmitter type encoded (see wiki) |
bool | valid | True when we received a packet else false. |
#define RadioControlEvent | ( | _received_frame_handler | ) | spektrum_event(_received_frame_handler) |
Definition at line 48 of file spektrum.h.
#define SPEKTRUM_CHANNELS_PER_FRAME 7 |
Maximum amount of RC channels per frame.
Definition at line 42 of file spektrum.h.
#define SPEKTRUM_FRAME_LEN 16 |
16 bytes in a standard frame
Definition at line 41 of file spektrum.h.
#define SPEKTRUM_MAX_CHANNELS (SPEKTRUM_CHANNELS_PER_FRAME * SPEKTRUM_MAX_FRAMES) |
Definition at line 44 of file spektrum.h.
#define SPEKTRUM_MAX_FRAMES 2 |
Maximum amount of RC frames containing different channels.
Definition at line 43 of file spektrum.h.
#define SPEKTRUM_MIN_FRAME_SPACE 7 |
Minum amount of time between frames (7ms), in fact either 11 or 22 ms.
Definition at line 45 of file spektrum.h.
#define SPEKTRUM_SATELLITES_NB 2 |
Definition at line 38 of file spektrum.h.
void spektrum_event | ( | void(*)(void) | _received_frame_handler | ) |
Checks if there is one valid satellite and sets the radio_control structure.
Definition at line 47 of file spektrum_arch.c.
References RadioControl::frame_cpt, MAX_PPRZ, radio_control, RADIO_CONTROL_NB_CHANNEL, RC_OK, spektrum_t::satellites, spektrum_t::signs, spektrum, spektrum_available, SPEKTRUM_SATELLITES_NB, spektrum_uart_check(), RadioControl::status, RadioControl::time_since_last_frame, spektrum_sat_t::valid, spektrum_t::valid, spektrum_sat_t::values, and RadioControl::values.
void spektrum_try_bind | ( | void | ) |
Definition at line 58 of file spektrum_arch.c.
References gpio_get(), gpio_setup_input_pulldown(), gpio_setup_input_pullup(), spektrum_bind(), SPEKTRUM_BIND_PIN, SPEKTRUM_BIND_PIN_PORT, and sys_time_usleep().