mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 05:45:31 +03:00
Moved pidControllers out of mw.c into flight_common.c/h. Moved appropriate code into rc_controls.c/h.
15 lines
365 B
C
15 lines
365 B
C
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
#include <math.h>
|
|
|
|
#include "common/maths.h"
|
|
|
|
#include "rc_controls.h"
|
|
|
|
int16_t rcCommand[4]; // interval [1000;2000] for THROTTLE and [-500;+500] for ROLL/PITCH/YAW
|
|
|
|
bool areSticksInApModePosition(uint16_t ap_mode)
|
|
{
|
|
return abs(rcCommand[ROLL]) < ap_mode && abs(rcCommand[PITCH]) < ap_mode;
|
|
}
|