Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
autopilot_rc_helpers.h File Reference

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

#include "generated/airframe.h"
#include "modules/radio_control/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

◆ rc_mode_switch()

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.