1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 05:45:31 +03:00
betaflight/src/rc_controls.c
Dominic Clifton fe89d40fa0 Remove main.c's dependency on mw.h/board.h.
Moved pidControllers out of mw.c into flight_common.c/h.
Moved appropriate code into rc_controls.c/h.
2014-04-22 01:58:23 +01:00

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;
}