Add rc_rate_yaw // SuperExpo feature renamed to SUPEREXPO_RATES
[betaflight.git] / src / main / config / config.h
blob7bd7a2e05242db31a76c55cc6c7c05231dbe2fe3
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #define MAX_PROFILE_COUNT 2
21 #define MAX_RATEPROFILES 3
22 #define ONESHOT_FEATURE_CHANGED_DELAY_ON_BOOT_MS 1500
24 typedef enum {
25 FEATURE_RX_PPM = 1 << 0,
26 FEATURE_VBAT = 1 << 1,
27 FEATURE_INFLIGHT_ACC_CAL = 1 << 2,
28 FEATURE_RX_SERIAL = 1 << 3,
29 FEATURE_MOTOR_STOP = 1 << 4,
30 FEATURE_SERVO_TILT = 1 << 5,
31 FEATURE_SOFTSERIAL = 1 << 6,
32 FEATURE_GPS = 1 << 7,
33 FEATURE_FAILSAFE = 1 << 8,
34 FEATURE_SONAR = 1 << 9,
35 FEATURE_TELEMETRY = 1 << 10,
36 FEATURE_CURRENT_METER = 1 << 11,
37 FEATURE_3D = 1 << 12,
38 FEATURE_RX_PARALLEL_PWM = 1 << 13,
39 FEATURE_RX_MSP = 1 << 14,
40 FEATURE_RSSI_ADC = 1 << 15,
41 FEATURE_LED_STRIP = 1 << 16,
42 FEATURE_DISPLAY = 1 << 17,
43 FEATURE_ONESHOT125 = 1 << 18,
44 FEATURE_BLACKBOX = 1 << 19,
45 FEATURE_CHANNEL_FORWARDING = 1 << 20,
46 FEATURE_TRANSPONDER = 1 << 21,
47 FEATURE_AIRMODE = 1 << 22,
48 FEATURE_SUPEREXPO_RATES = 1 << 23,
49 } features_e;
51 void handleOneshotFeatureChangeOnRestart(void);
52 void latchActiveFeatures(void);
53 bool featureConfigured(uint32_t mask);
54 bool feature(uint32_t mask);
55 void featureSet(uint32_t mask);
56 void featureClear(uint32_t mask);
57 void featureClearAll(void);
58 uint32_t featureMask(void);
59 void beeperOffSet(uint32_t mask);
60 void beeperOffSetAll(uint8_t beeperCount);
61 void beeperOffClear(uint32_t mask);
62 void beeperOffClearAll(void);
63 uint32_t getBeeperOffMask(void);
64 void setBeeperOffMask(uint32_t mask);
65 uint32_t getPreferredBeeperOffMask(void);
66 void setPreferredBeeperOffMask(uint32_t mask);
68 void copyCurrentProfileToProfileSlot(uint8_t profileSlotIndex);
70 void initEEPROM(void);
71 void resetEEPROM(void);
72 void readEEPROM(void);
73 void readEEPROMAndNotify(void);
74 void writeEEPROM();
75 void ensureEEPROMContainsValidData(void);
76 void saveConfigAndNotify(void);
78 uint8_t getCurrentProfile(void);
79 void changeProfile(uint8_t profileIndex);
81 uint8_t getCurrentControlRateProfile(void);
82 void changeControlRateProfile(uint8_t profileIndex);
83 bool canSoftwareSerialBeUsed(void);
85 uint16_t getCurrentMinthrottle(void);