[MSP SENSOR] Add support for MSP Airspeed sensor
[inav.git] / src / main / target / common.h
blobc403b78ecdeba22f564d65967b026151b96a5a75
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 #if defined(STM32F3)
21 #define DYNAMIC_HEAP_SIZE 1024
22 #else
23 #define DYNAMIC_HEAP_SIZE 2048
24 #endif
26 #define I2C1_OVERCLOCK false
27 #define I2C2_OVERCLOCK false
28 #define USE_I2C_PULLUP // Enable built-in pullups on all boards in case external ones are too week
30 #define USE_RX_PPM
31 #define USE_SERIAL_RX
32 #define USE_SERIALRX_SPEKTRUM // Cheap and fairly common protocol
33 #define USE_SERIALRX_SBUS // Very common protocol
34 #define USE_SERIALRX_IBUS // Cheap FlySky & Turnigy receivers
35 #define USE_SERIALRX_FPORT
36 #define USE_SERIALRX_FPORT2
38 #define COMMON_DEFAULT_FEATURES (FEATURE_TX_PROF_SEL)
40 #if defined(STM32F3)
41 #define USE_UNDERCLOCK
42 //save flash for F3 targets
43 #define CLI_MINIMAL_VERBOSITY
44 #define SKIP_CLI_COMMAND_HELP
45 #define SKIP_CLI_RESOURCES
46 #endif
48 #if defined(STM32F4) || defined(STM32F7)
49 #define USE_SERVO_SBUS
50 #endif
52 #define USE_ADC_AVERAGING
53 #define USE_64BIT_TIME
54 #define USE_BLACKBOX
55 #define USE_GPS
56 #define USE_GPS_PROTO_UBLOX
57 #define USE_GPS_PROTO_MSP
58 #define USE_NAV
59 #define USE_TELEMETRY
60 #define USE_TELEMETRY_LTM
61 #define USE_TELEMETRY_FRSKY
63 #if defined(STM_FAST_TARGET)
64 #define SCHEDULER_DELAY_LIMIT 10
65 #else
66 #define SCHEDULER_DELAY_LIMIT 100
67 #endif
69 #if (FLASH_SIZE > 256)
70 #define USE_MR_BRAKING_MODE
71 #define USE_PITOT
72 #define USE_PITOT_ADC
73 #define USE_PITOT_VIRTUAL
75 #define USE_DYNAMIC_FILTERS
76 #define USE_GYRO_KALMAN
77 #define USE_EXTENDED_CMS_MENUS
78 #define USE_UAV_INTERCONNECT
79 #define USE_RX_UIB
80 #define USE_HOTT_TEXTMODE
82 // NAZA GPS support for F4+ only
83 #define USE_GPS_PROTO_NAZA
85 // Allow default rangefinders
86 #define USE_RANGEFINDER
87 #define USE_RANGEFINDER_MSP
88 #define USE_RANGEFINDER_BENEWAKE
89 #define USE_RANGEFINDER_VL53L0X
90 #define USE_RANGEFINDER_HCSR04_I2C
92 // Allow default optic flow boards
93 #define USE_OPFLOW
94 #define USE_OPFLOW_CXOF
95 #define USE_OPFLOW_MSP
97 // Allow default airspeed sensors
98 #define USE_PITOT
99 #define USE_PITOT_MS4525
100 #define USE_PITOT_MSP
102 #define USE_1WIRE
103 #define USE_1WIRE_DS2482
105 #define USE_TEMPERATURE_SENSOR
106 #define USE_TEMPERATURE_LM75
107 #define USE_TEMPERATURE_DS18B20
109 #define USE_MSP_DISPLAYPORT
110 #define USE_DASHBOARD
111 #define DASHBOARD_ARMED_BITMAP
112 #define USE_OLED_UG2864
114 #define USE_PWM_DRIVER_PCA9685
116 #define USE_TELEMETRY_SIM
117 #define USE_FRSKYOSD
118 #define USE_DJI_HD_OSD
119 #define USE_SMARTPORT_MASTER
121 #define NAV_NON_VOLATILE_WAYPOINT_CLI
123 #define NAV_AUTO_MAG_DECLINATION_PRECISE
125 #define USE_D_BOOST
126 #define USE_ANTIGRAVITY
128 #define USE_I2C_IO_EXPANDER
130 #define USE_SERIALRX_SRXL2 // Spektrum SRXL2 protocol
131 #define USE_TELEMETRY_SRXL
132 #define USE_SPEKTRUM_CMS_TELEMETRY
133 //#define USE_SPEKTRUM_VTX_CONTROL //Some functions from betaflight still not implemented
134 #define USE_SPEKTRUM_VTX_TELEMETRY
136 #define USE_VTX_COMMON
138 #else // FLASH_SIZE < 256
139 #define LOG_LEVEL_MAXIMUM LOG_LEVEL_ERROR
140 #endif
142 #if (FLASH_SIZE > 128)
143 #define NAV_FIXED_WING_LANDING
144 #define USE_SAFE_HOME
145 #define USE_AUTOTUNE_FIXED_WING
146 #define USE_LOG
147 #define USE_STATS
148 #define USE_CMS
149 #define CMS_MENU_OSD
150 #define USE_GPS_PROTO_NMEA
151 #define USE_GPS_PROTO_MTK
152 #define NAV_GPS_GLITCH_DETECTION
153 #define NAV_NON_VOLATILE_WAYPOINT_STORAGE
154 #define USE_TELEMETRY_HOTT
155 #define USE_TELEMETRY_IBUS
156 #define USE_TELEMETRY_MAVLINK
157 #define USE_TELEMETRY_SMARTPORT
158 #define USE_TELEMETRY_CRSF
159 #define USE_MSP_OVER_TELEMETRY
160 // These are rather exotic serial protocols
161 #define USE_RX_MSP
162 //#define USE_MSP_RC_OVERRIDE
163 #define USE_SERIALRX_SUMD
164 #define USE_SERIALRX_SUMH
165 #define USE_SERIALRX_XBUS
166 #define USE_SERIALRX_JETIEXBUS
167 #define USE_SERIALRX_CRSF
168 #define USE_PWM_SERVO_DRIVER
169 #define USE_SERIAL_PASSTHROUGH
170 #define NAV_MAX_WAYPOINTS 60
171 #define USE_RCDEVICE
173 //Enable VTX control
174 #define USE_VTX_CONTROL
175 #define USE_VTX_SMARTAUDIO
176 #define USE_VTX_TRAMP
177 #define USE_VTX_FFPV
179 #ifndef STM32F3 //F3 series does not have enoug RAM to support logic conditions
180 #define USE_PROGRAMMING_FRAMEWORK
181 #define USE_CLI_BATCH
182 #endif
184 //Enable DST calculations
185 #define RTC_AUTOMATIC_DST
186 // Wind estimator
187 #define USE_WIND_ESTIMATOR
189 #else // FLASH_SIZE < 128
191 #define SKIP_TASK_STATISTICS
193 #endif
195 #ifdef STM32F7
196 #define USE_ITCM_RAM
197 #endif