21 #include "../config/mixer.h"
22 #include "../config/rc_controls.h"
23 #include "../config/rx.h"
25 #include "../common/filter.h"
26 #include "../common/maths.h"
52 #define YAW_JUMP_PREVENTION_LIMIT_LOW 80
53 #define YAW_JUMP_PREVENTION_LIMIT_HIGH 500
#define MAX_SUPPORTED_SERVOS
Definition: mixer.h:25
biquad_t servoFilterState[MAX_SUPPORTED_SERVOS]
Definition: mixer.h:79
#define MIXER_MAX_RULES
Definition: mixer.h:171
void mixer_input_command(struct mixer *self, mixer_input_t i, int16_t value)
inputs a command to one of the input channels of the mixer
Definition: mixer.c:750
const struct system_calls_pwm * pwm
Definition: mixer.h:84
int16_t minthrottle
Definition: mixer.h:77
pwm related system calls
Definition: system_calls.h:47
int16_t maxthrottle
Definition: mixer.h:77
int16_t midthrottle
output offset, min and max for motors
Definition: mixer.h:77
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)
Definition: mixer.c:764
struct mixer_rule_def active_rules[MIXER_MAX_RULES]
Definition: mixer.h:74
void mixer_enable_armed(struct mixer *self, bool on)
puts mixer into armed state so that outputs are calculated (TODO: this should probably be placed outs...
Definition: mixer.c:883
bool motorLimitReached
Definition: mixer.h:69
uint8_t flags
Definition: mixer.h:62
uint8_t servoCount
Definition: mixer.h:66
const struct config * config
Definition: mixer.h:82
int16_t input[MIXER_INPUT_COUNT]
Definition: mixer.h:56
void mixer_clear_rules(struct mixer *self)
saves motor mixer into cleanflight motor mixer format
Definition: mixer.c:739
void mixer_update(struct mixer *self)
calculates outputs from all mixer inputs and mixing rules
Definition: mixer.c:815
mixer_input_t
Definition: mixer.h:97
void mixer_init(struct mixer *self, const struct config *config, const struct system_calls_pwm *pwm)
initializes a mixer struct
int16_t max
Maximum pwm value that is sent to the servo.
Definition: mixer.h:13
uint8_t ruleCount
Definition: mixer.h:67
uint8_t mixer_get_servo_count(struct mixer *self)
returns total number of servos that are being actively mxier by the mixer as part of current profile ...
Definition: mixer.c:916
int16_t min
Minimum pwm value that is sent to the servo.
Definition: mixer.h:12
uint8_t motorCount
output count in current configuration being used by the mixer
Definition: mixer.h:65
bool mixer_motor_limit_reached(struct mixer *self)
tests if any of the motors have reached their limit (usually maxthrottle)
Definition: mixer.c:906
uint8_t mode
currently used mixer mode
Definition: mixer.h:72
mixer rule definition in new format
Definition: mixer.h:165
uint8_t mixer_get_motor_count(struct mixer *self)
returns total number of motors that are being actively mixed by the mixer as part of current profile ...
Definition: mixer.c:911