NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rc_adjustments.h File Reference
Include dependency graph for rc_adjustments.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  adjustmentStepConfig_s
 
struct  adjustmentSelectConfig_s
 
union  adjustmentConfig_u
 
struct  adjustmentConfig_s
 
struct  adjustmentState_s
 
struct  rc_adj
 

Macros

#define PID_MIN   0
 
#define PID_MAX   200
 
#define PID_F_MIN   0
 
#define PID_F_MAX   100
 
#define RC_RATE_MIN   0
 
#define RC_RATE_MAX   250
 
#define EXPO_MIN   0
 
#define EXPO_MAX   100
 
#define ADJUSTMENT_FUNCTION_COUNT   39
 
#define ADJUSTMENT_INDEX_OFFSET   1
 
#define MAX_SIMULTANEOUS_ADJUSTMENT_COUNT   4
 

Typedefs

typedef struct
adjustmentStepConfig_s 
adjustmentStepConfig_t
 
typedef struct
adjustmentSelectConfig_s 
adjustmentSelectConfig_t
 
typedef union adjustmentConfig_u adjustmentData_t
 
typedef struct adjustmentConfig_s adjustmentConfig_t
 
typedef struct adjustmentState_s adjustmentState_t
 

Enumerations

enum  adjustmentFunction_e {
  ADJUSTMENT_NONE = 0, ADJUSTMENT_RC_RATE, ADJUSTMENT_RC_EXPO, ADJUSTMENT_THROTTLE_EXPO,
  ADJUSTMENT_PITCH_ROLL_RATE, ADJUSTMENT_YAW_RATE, ADJUSTMENT_PITCH_ROLL_P, ADJUSTMENT_PITCH_ROLL_I,
  ADJUSTMENT_PITCH_ROLL_D, ADJUSTMENT_YAW_P, ADJUSTMENT_YAW_I, ADJUSTMENT_YAW_D,
  ADJUSTMENT_RATE_PROFILE, ADJUSTMENT_PITCH_RATE, ADJUSTMENT_ROLL_RATE, ADJUSTMENT_PITCH_P,
  ADJUSTMENT_PITCH_I, ADJUSTMENT_PITCH_D, ADJUSTMENT_ROLL_P, ADJUSTMENT_ROLL_I,
  ADJUSTMENT_ROLL_D, ADJUSTMENT_ALT_P, ADJUSTMENT_ALT_I, ADJUSTMENT_ALT_D,
  ADJUSTMENT_VEL_P, ADJUSTMENT_VEL_I, ADJUSTMENT_VEL_D, ADJUSTMENT_MAG_P,
  ADJUSTMENT_POS_P, ADJUSTMENT_POS_I, ADJUSTMENT_POSR_P, ADJUSTMENT_POSR_I,
  ADJUSTMENT_POSR_D, ADJUSTMENT_NAVR_P, ADJUSTMENT_NAVR_I, ADJUSTMENT_NAVR_D,
  ADJUSTMENT_LEVEL_P, ADJUSTMENT_LEVEL_I, ADJUSTMENT_LEVEL_D
}
 
enum  adjustmentMode_e { ADJUSTMENT_MODE_STEP, ADJUSTMENT_MODE_SELECT }
 

Functions

void rc_adj_init (struct rc_adj *self, struct ninja *ninja, struct config *config)
 
void rc_adj_reset (struct rc_adj *self)
 
void rc_adj_add_range (struct rc_adj *self, adjustmentRange_t *adjustmentRange)
 
void rc_adj_update_states (struct rc_adj *self, adjustmentRange_t *adjustmentRanges)
 
void rc_adj_update (struct rc_adj *self)
 

Macro Definition Documentation

#define ADJUSTMENT_FUNCTION_COUNT   39
#define ADJUSTMENT_INDEX_OFFSET   1
#define EXPO_MAX   100
#define EXPO_MIN   0
#define MAX_SIMULTANEOUS_ADJUSTMENT_COUNT   4
#define PID_F_MAX   100
#define PID_F_MIN   0
#define PID_MAX   200
#define PID_MIN   0
#define RC_RATE_MAX   250
#define RC_RATE_MIN   0

Typedef Documentation

Enumeration Type Documentation

Enumerator
ADJUSTMENT_NONE 
ADJUSTMENT_RC_RATE 
ADJUSTMENT_RC_EXPO 
ADJUSTMENT_THROTTLE_EXPO 
ADJUSTMENT_PITCH_ROLL_RATE 
ADJUSTMENT_YAW_RATE 
ADJUSTMENT_PITCH_ROLL_P 
ADJUSTMENT_PITCH_ROLL_I 
ADJUSTMENT_PITCH_ROLL_D 
ADJUSTMENT_YAW_P 
ADJUSTMENT_YAW_I 
ADJUSTMENT_YAW_D 
ADJUSTMENT_RATE_PROFILE 
ADJUSTMENT_PITCH_RATE 
ADJUSTMENT_ROLL_RATE 
ADJUSTMENT_PITCH_P 
ADJUSTMENT_PITCH_I 
ADJUSTMENT_PITCH_D 
ADJUSTMENT_ROLL_P 
ADJUSTMENT_ROLL_I 
ADJUSTMENT_ROLL_D 
ADJUSTMENT_ALT_P 
ADJUSTMENT_ALT_I 
ADJUSTMENT_ALT_D 
ADJUSTMENT_VEL_P 
ADJUSTMENT_VEL_I 
ADJUSTMENT_VEL_D 
ADJUSTMENT_MAG_P 
ADJUSTMENT_POS_P 
ADJUSTMENT_POS_I 
ADJUSTMENT_POSR_P 
ADJUSTMENT_POSR_I 
ADJUSTMENT_POSR_D 
ADJUSTMENT_NAVR_P 
ADJUSTMENT_NAVR_I 
ADJUSTMENT_NAVR_D 
ADJUSTMENT_LEVEL_P 
ADJUSTMENT_LEVEL_I 
ADJUSTMENT_LEVEL_D 
Enumerator
ADJUSTMENT_MODE_STEP 
ADJUSTMENT_MODE_SELECT 

Function Documentation

void rc_adj_add_range ( struct rc_adj self,
adjustmentRange_t *  adjustmentRange 
)

Here is the call graph for this function:

void rc_adj_init ( struct rc_adj self,
struct ninja ninja,
struct config config 
)
void rc_adj_reset ( struct rc_adj self)
void rc_adj_update ( struct rc_adj self)

Here is the call graph for this function:

void rc_adj_update_states ( struct rc_adj self,
adjustmentRange_t *  adjustmentRanges 
)