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)
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/>.
27 #define CONTROL_RATE_PROFILE_COUNT 6
30 RATES_TYPE_BETAFLIGHT
= 0,
31 RATES_TYPE_RACEFLIGHT
,
35 THROTTLE_LIMIT_TYPE_OFF
= 0,
36 THROTTLE_LIMIT_TYPE_SCALE
,
37 THROTTLE_LIMIT_TYPE_CLIP
,
38 } throttleLimitType_e
;
40 typedef struct controlRateConfig_s
{
48 uint16_t tpa_breakpoint
; // Breakpoint where TPA is activated
49 uint8_t throttle_limit_type
; // Sets the throttle limiting type - off, scale or clip
50 uint8_t throttle_limit_percent
; // Sets the maximum pilot commanded throttle limit
51 } controlRateConfig_t
;
53 PG_DECLARE_ARRAY(controlRateConfig_t
, CONTROL_RATE_PROFILE_COUNT
, controlRateProfiles
);
55 extern controlRateConfig_t
*currentControlRateProfile
;
57 void loadControlRateProfile(void);
58 void changeControlRateProfile(uint8_t controlRateProfileIndex
);
60 void copyControlRateProfile(const uint8_t dstControlRateProfileIndex
, const uint8_t srcControlRateProfileIndex
);