|
NinjaFlight
|
#include <stdbool.h>#include <stdint.h>#include <string.h>#include <stddef.h>#include <platform.h>#include "build_config.h"#include "common/maths.h"#include "common/axis.h"#include "config/config.h"#include "rc_command.h"#include "rx/rx.h"
Macros | |
| #define | RC_MID 1500 |
| #define | RC_MIN 1000 |
| #define | RC_MAX 2000 |
Functions | |
| void | rc_command_init (struct rc_command *self, struct rx *rx) |
| Initializes the curves with default linear ranges. More... | |
| void | rc_command_update (struct rc_command *self) |
| Updates current rc rates from the current rc values. Inputs are in range [1000;2000] and should correspond to raw pwm values from rc receiver. More... | |
| int16_t | rc_command_axis (struct rc_command *self, uint8_t axis) |
| Get current stick value in range [-500;500], stick is only ROLL, PITCH, YAw. More... | |
| void | rc_command_set_rate_config (struct rc_command *self, const struct rate_profile *rates) |
| Updates internal variables to use new rates and also recalculates the lookup tables if the supplied profile is different than the one that is currently being used. More... | |
| #define RC_MAX 2000 |
| #define RC_MID 1500 |
| #define RC_MIN 1000 |
| int16_t rc_command_axis | ( | struct rc_command * | self, |
| uint8_t | axis | ||
| ) |
Get current stick value in range [-500;500], stick is only ROLL, PITCH, YAw.
| void rc_command_init | ( | struct rc_command * | self, |
| struct rx * | rx | ||
| ) |
Initializes the curves with default linear ranges.
| void rc_command_set_rate_config | ( | struct rc_command * | self, |
| const struct rate_profile * | rates | ||
| ) |
Updates internal variables to use new rates and also recalculates the lookup tables if the supplied profile is different than the one that is currently being used.
| void rc_command_update | ( | struct rc_command * | self | ) |
Updates current rc rates from the current rc values. Inputs are in range [1000;2000] and should correspond to raw pwm values from rc receiver.
