NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rc_adjustments.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <math.h>
#include <platform.h>
#include "system_calls.h"
#include "build_config.h"
#include "common/axis.h"
#include "common/maths.h"
#include "drivers/system.h"
#include "config/config.h"
#include "config/feature.h"
#include "io/beeper.h"
#include "ninja.h"
#include "io/rc_adjustments.h"
Include dependency graph for rc_adjustments.c:

Macros

#define MARK_ADJUSTMENT_FUNCTION_AS_BUSY(adjustmentIndex)   self->adjustmentStateMask |= (1 << adjustmentIndex)
 
#define MARK_ADJUSTMENT_FUNCTION_AS_READY(adjustmentIndex)   self->adjustmentStateMask &= ~(1 << adjustmentIndex)
 
#define IS_ADJUSTMENT_FUNCTION_BUSY(adjustmentIndex)   (self->adjustmentStateMask & (1 << adjustmentIndex))
 
#define RESET_FREQUENCY_2HZ   (1000 / 2)
 

Functions

void blackboxLogInflightAdjustmentEventFloat (adjustmentFunction_e adjustmentFunction, float newFloatValue)
 
void rc_adj_add_range (struct rc_adj *self, adjustmentRange_t *adjustmentRange)
 
void rc_adj_update (struct rc_adj *self)
 
void rc_adj_update_states (struct rc_adj *self, adjustmentRange_t *adjustmentRanges)
 
void rc_adj_init (struct rc_adj *self, struct ninja *ninja, struct config *config)
 
void rc_adj_reset (struct rc_adj *self)
 

Macro Definition Documentation

#define IS_ADJUSTMENT_FUNCTION_BUSY (   adjustmentIndex)    (self->adjustmentStateMask & (1 << adjustmentIndex))
#define MARK_ADJUSTMENT_FUNCTION_AS_BUSY (   adjustmentIndex)    self->adjustmentStateMask |= (1 << adjustmentIndex)
#define MARK_ADJUSTMENT_FUNCTION_AS_READY (   adjustmentIndex)    self->adjustmentStateMask &= ~(1 << adjustmentIndex)
#define RESET_FREQUENCY_2HZ   (1000 / 2)

Function Documentation

void blackboxLogInflightAdjustmentEventFloat ( adjustmentFunction_e  adjustmentFunction,
float  newFloatValue 
)

Here is the call graph for this function:

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 
)