| NinjaFlight
    | 
#include <stdbool.h>#include <stdint.h>#include <string.h>#include <math.h>#include <platform.h>#include "build_config.h"#include "config/config.h"#include "common/axis.h"#include "common/maths.h"#include "common/filter.h"#include "drivers/gyro_sync.h"#include "sensors/acceleration.h"#include "sensors/gyro.h"#include "rx/rx.h"#include "anglerate.h"#include "rate_profile.h"#include "navigation.h"#include "mixer.h"#include "gtune.h"
| Macros | |
| #define | ANGLERATE_FLAG_ANTIWINDUP (1 << 0) | 
| #define | ANGLERATE_FLAG_PLIMIT (1 << 0) | 
| Functions | |
| void | anglerate_init (struct anglerate *self, struct instruments *ins, const struct config const *config) | 
| void | anglerate_set_algo (struct anglerate *self, pid_controller_type_t type) | 
| void | anglerate_reset_angle_i (struct anglerate *self) | 
| void | anglerate_reset_rate_i (struct anglerate *self) | 
| const struct pid_controller_output * | anglerate_get_output_ptr (struct anglerate *self) | 
| void | anglerate_update (struct anglerate *self, float dt) | 
| void | anglerate_enable_plimit (struct anglerate *self, bool on) | 
| void | anglerate_enable_antiwindup (struct anglerate *self, bool on) | 
| void | anglerate_set_pid_axis_scale (struct anglerate *self, uint8_t axis, int32_t scale) | 
| void | anglerate_set_pid_axis_weight (struct anglerate *self, uint8_t axis, int32_t weight) | 
| void | anglerate_input_body_rates (struct anglerate *self, int16_t x, int16_t y, int16_t z) | 
| void | anglerate_input_body_angles (struct anglerate *self, int16_t roll, int16_t pitch, int16_t yaw) | 
| void | anglerate_input_user (struct anglerate *self, int16_t roll, int16_t pitch, int16_t yaw) | 
| void | anglerate_set_level_percent (struct anglerate *self, uint8_t roll, uint8_t pitch) | 
| #define ANGLERATE_FLAG_ANTIWINDUP (1 << 0) | 
| #define ANGLERATE_FLAG_PLIMIT (1 << 0) | 
| void anglerate_enable_antiwindup | ( | struct anglerate * | self, | 
| bool | on | ||
| ) | 
| void anglerate_enable_plimit | ( | struct anglerate * | self, | 
| bool | on | ||
| ) | 
| const struct pid_controller_output* anglerate_get_output_ptr | ( | struct anglerate * | self | ) | 
| void anglerate_init | ( | struct anglerate * | self, | 
| struct instruments * | ins, | ||
| const struct config const * | config | ||
| ) | 
| void anglerate_input_body_angles | ( | struct anglerate * | self, | 
| int16_t | roll, | ||
| int16_t | pitch, | ||
| int16_t | yaw | ||
| ) | 
| void anglerate_input_body_rates | ( | struct anglerate * | self, | 
| int16_t | x, | ||
| int16_t | y, | ||
| int16_t | z | ||
| ) | 
| void anglerate_input_user | ( | struct anglerate * | self, | 
| int16_t | roll, | ||
| int16_t | pitch, | ||
| int16_t | yaw | ||
| ) | 

| void anglerate_reset_angle_i | ( | struct anglerate * | self | ) | 
| void anglerate_reset_rate_i | ( | struct anglerate * | self | ) | 
| void anglerate_set_algo | ( | struct anglerate * | self, | 
| pid_controller_type_t | type | ||
| ) | 
| void anglerate_set_level_percent | ( | struct anglerate * | self, | 
| uint8_t | roll, | ||
| uint8_t | pitch | ||
| ) | 
| void anglerate_set_pid_axis_scale | ( | struct anglerate * | self, | 
| uint8_t | axis, | ||
| int32_t | scale | ||
| ) | 
| void anglerate_set_pid_axis_weight | ( | struct anglerate * | self, | 
| uint8_t | axis, | ||
| int32_t | weight | ||
| ) | 
| void anglerate_update | ( | struct anglerate * | self, | 
| float | dt | ||
| ) |