Paparazzi UAS  v5.15_devel-88-gb3ad7fe
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
autopilot_rc_helpers.h File Reference

Some helper functions to check RC sticks. More...

#include "generated/airframe.h"
#include "subsystems/radio_control.h"
+ Include dependency graph for autopilot_rc_helpers.h:

Go to the source code of this file.

Functions

static bool rc_mode_switch (uint8_t chan, uint8_t pos, uint8_t max)
 RC mode switch position helper switch positions threshold are evenly spaced. More...
 

Detailed Description

Some helper functions to check RC sticks.

Definition in file autopilot_rc_helpers.h.

Function Documentation

static bool rc_mode_switch ( uint8_t  chan,
uint8_t  pos,
uint8_t  max 
)
inlinestatic

RC mode switch position helper switch positions threshold are evenly spaced.

Parameters
[in]chanRC mode channel number
[in]posswitch position to be tested
[in]maxmaximum number of position of the switch
Returns
true if current position is the same as requested (and RC status is OK)

Definition at line 41 of file autopilot_rc_helpers.h.

References MAX_PPRZ, MIN_PPRZ, p, radio_control, RC_OK, RadioControl::status, and RadioControl::values.