Update actions to ubuntu-latest (#14114)
[betaflight.git] / src / main / fc / rc.h
blob75aca335d074c47b9ad15555ee2683e4af8e3c3d
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 "drivers/time.h"
25 #include "fc/rc_controls.h"
27 #ifdef USE_RC_SMOOTHING_FILTER
28 #define RC_SMOOTHING_AUTO_FACTOR_MIN 0
29 #define RC_SMOOTHING_AUTO_FACTOR_MAX 250
30 #endif
32 void processRcCommand(void);
33 float getSetpointRate(int axis);
34 float getRcDeflection(int axis);
35 float getRcDeflectionRaw(int axis);
36 float getRcDeflectionAbs(int axis);
37 float getMaxRcDeflectionAbs(void);
38 void updateRcCommands(void);
39 void resetYawAxis(void);
40 void initRcProcessing(void);
41 bool isMotorsReversed(void);
42 rcSmoothingFilter_t *getRcSmoothingData(void);
43 bool rcSmoothingAutoCalculate(void);
44 bool rcSmoothingInitializationComplete(void);
46 float getMaxRcRate(int axis);
47 float getFeedforward(int axis);
49 void updateRcRefreshRate(timeUs_t currentTimeUs, bool rxReceivingSignal);
50 uint16_t getCurrentRxRateHz(void);
51 bool getRxRateValid(void);