NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mixer.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <platform.h>
#include "build_config.h"
#include "config/config.h"
#include "mixer.h"
Include dependency graph for mixer.c:

Enumerations

enum  mixer_flags { MIXER_FLAG_ARMED = (1 << 3) }
 

Functions

void mixer_init (struct mixer *self, const struct config const *config, const struct system_calls_pwm *pwm)
 
void mixer_clear_rules (struct mixer *self)
 saves motor mixer into cleanflight motor mixer format More...
 
void mixer_input_command (struct mixer *self, mixer_input_t channel, int16_t value)
 inputs a command to one of the input channels of the mixer More...
 
void mixer_set_throttle_range (struct mixer *self, int16_t mid, int16_t min, int16_t max)
 sets throttle range of the mixer (can be used to set 3d throttle range too) More...
 
void mixer_update (struct mixer *self)
 calculates outputs from all mixer inputs and mixing rules More...
 
void mixer_enable_armed (struct mixer *self, bool on)
 arms/disarms the mixer (when disarmed, motor outputs will be set to disarmed pwm values. These are reset to either midrc when in 3d mode or to mincommand when not in 3d mode) More...
 
bool mixer_motor_limit_reached (struct mixer *self)
 returns true if mixer has determined that motor limit has been reached More...
 
uint8_t mixer_get_motor_count (struct mixer *self)
 returns the number of motors that are currently being controlled by mixer profile More...
 
uint8_t mixer_get_servo_count (struct mixer *self)
 returns number of servos that are used by the mixer. More...
 

Detailed Description

Mixer implementation