Merge pull request #9453 from etracer65/use_blackbox_compiler_warning
[betaflight.git] / src / main / fc / rc.h
blob3e7407e3c93716c1548e3c8b96ef331d7014e8e6
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #pragma once
23 #include "fc/rc_controls.h"
25 typedef enum {
26 INTERPOLATION_CHANNELS_RP,
27 INTERPOLATION_CHANNELS_RPY,
28 INTERPOLATION_CHANNELS_RPYT,
29 INTERPOLATION_CHANNELS_T,
30 INTERPOLATION_CHANNELS_RPT,
31 } interpolationChannels_e;
33 extern uint16_t currentRxRefreshRate;
35 void processRcCommand(void);
36 float getSetpointRate(int axis);
37 float getRcDeflection(int axis);
38 float getRcDeflectionAbs(int axis);
39 float getThrottlePIDAttenuation(void);
40 void updateRcCommands(void);
41 void resetYawAxis(void);
42 void initRcProcessing(void);
43 bool isMotorsReversed(void);
44 bool rcSmoothingIsEnabled(void);
45 rcSmoothingFilter_t *getRcSmoothingData(void);
46 bool rcSmoothingAutoCalculate(void);
47 bool rcSmoothingInitializationComplete(void);
48 float getRawSetpoint(int axis);
49 float getRawDeflection(int axis);
50 float applyCurve(int axis, float deflection);
51 uint32_t getRcFrameNumber();
52 float getRcCurveSlope(int axis, float deflection);