Traxxas TQ 1st gen: try 5
[DIY-Multiprotocol-TX-Module.git] / Multiprotocol / _Config.h
blob5aa11fc817fade7f585f40fd6d79297bf3942df1
1 /*
2 This project is free software: you can redistribute it and/or modify
3 it under the terms of the GNU General Public License as published by
4 the Free Software Foundation, either version 3 of the License, or
5 (at your option) any later version.
7 Multiprotocol is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with Multiprotocol. If not, see <http://www.gnu.org/licenses/>.
16 /**********************************************/
17 /** Multiprotocol module configuration file ***/
18 /**********************************************/
20 /********************/
21 /*** LOCAL CONFIG ***/
22 /********************/
23 //If you know parameters you want for sure to be enabled or disabled which survives in future, you can use a file named "_MyConfig.h".
24 //An example is given within the file named "_MyConfig.h.example" which needs to be renamed if you want to use it.
25 //To enable this config file remove the // from the line below.
26 //#define USE_MY_CONFIG
29 /*************************/
30 /*** BOOTLOADER USE ***/
31 /*************************/
32 //Allow flashing multimodule directly with TX(erky9x or opentx maintenance mode)
33 //Instructions:https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/blob/master/docs/Flash_from_Tx.md
34 //To disable this feature add "//" at the begining of the next line. Requires a compatible bootloader or upload method to be selected when you use the Multi 4-in-1 Boards Manager definitions.
35 #define CHECK_FOR_BOOTLOADER
38 /*******************/
39 /*** TX SETTINGS ***/
40 /*******************/
41 //Modify the channel order based on your TX: AETR, TAER, RETA...
42 //Examples: Flysky & DEVO is AETR, JR/Spektrum radio is TAER, Multiplex is AERT...
43 //Default is AETR.
44 #define AETR
46 //Uncomment to reverse the direction of the specified channel for all protocols
47 //#define REVERSE_AILERON
48 //#define REVERSE_ELEVATOR
49 //#define REVERSE_THROTTLE
50 //#define REVERSE_RUDDER
53 /*****************/
54 /*** AUTO BIND ***/ // Also referred as "Bind on powerup"
55 /*****************/
56 //Bind from channel enables you to bind when a specified channel is going from low to high. This feature is only active
57 // if you specify AUTOBIND in PPM mode or set AutoBind to YES for serial mode.
58 //Comment to globaly disable the bind feature from a channel.
59 #define ENABLE_BIND_CH
60 //Set the channel number used for bind. Default is 16.
61 #define BIND_CH 16
63 //Comment to disable the wait for bind feature. If Autobind is enabled in the model config, this feature will not activate
64 // the selected protocol unless a bind is requested using bind from channel or the GUI "Bind" button.
65 //The goal is to prevent binding other people's model when powering up the TX, changing model or scanning through protocols.
66 #define WAIT_FOR_BIND
69 /****************/
70 /*** RF CHIPS ***/
71 /****************/
72 //There are 5 RF components supported. If one of them is not installed you must comment it using "//".
73 //If a chip is not installed all associated protocols are automatically disabled.
74 //4-in-1 modules have the A7105, CYRF6936, CC2500 and NRF24L01 RF chips installed
75 //5-in-1 modules have all RF chips installed
76 //!!!If a RF chip is present it MUST be marked as installed!!! or weird things will happen you have been warned.
77 #define A7105_INSTALLED
78 #define CYRF6936_INSTALLED
79 #define CC2500_INSTALLED
80 #define NRF24L01_INSTALLED
81 //#define SX1276_INSTALLED // only supported on STM32 modules
83 //Uncomment (remove //) if you have an internal 5-in-1 Multi module in a Jumper T18 or T-Lite.
84 //All components are considered to be installed and specifics to that module are automatically configured
85 //#define MULTI_5IN1_INTERNAL JP_T18
86 //#define MULTI_5IN1_INTERNAL JP_TLite
88 /** OrangeRX TX **/
89 //If you compile for the OrangeRX TX module you need to select the correct board type.
90 //By default the compilation is done for the GREEN board, to switch to a BLUE board uncomment the line below by removing the "//"
91 //#define ORANGE_TX_BLUE
93 /** CC2500 Fine Frequency Tuning **/
94 //For optimal performance the CC2500 RF module used by the CORONA, FrSkyD, FrSkyV, FrSkyX, Hitec, HoTT, Futaba/SFHSS and Redpine protocols needs to be tuned for each protocol.
95 //Initial tuning should be done via the radio menu with a genuine CORONA/FrSky/Hitec/HoTT/Futaba/Redpine receiver.
96 //Once a good tuning value is found it can be set here and will override the radio's 'option' setting for all existing and new models which use that protocol.
97 //For more information: https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/tree/master/docs/Frequency_Tuning.md
98 //Uncomment the lines below (remove the "//") and set an appropriate value (replace the "0") to enable. Valid range is -127 to +127.
99 //#define FORCE_CORONA_TUNING 0
100 //#define FORCE_FRSKYD_TUNING 0
101 //#define FORCE_FRSKYL_TUNING 0
102 //#define FORCE_FRSKYV_TUNING 0
103 //#define FORCE_FRSKYX_TUNING 0
104 //#define FORCE_HITEC_TUNING 0
105 //#define FORCE_HOTT_TUNING 0
106 //#define FORCE_RADIOLINK_TUNING 0
107 //#define FORCE_REDPINE_TUNING 0
108 //#define FORCE_FUTABA_TUNING 0
109 //#define FORCE_SKYARTEC_TUNING 0
111 /** A7105 Fine Frequency Tuning **/
112 //This is required in rare cases where some A7105 modules and/or RXs have an inaccurate crystal oscillator.
113 //If using Serial mode only (for now), you can use CH15 to find the right tuning value. -100%=-300, 0%=default 0, +100%=+300.
114 //Uncomment the line below (remove the "//") to enable this feature.
115 //#define USE_A7105_CH15_TUNING
117 //Once a good tuning value is found it can be set here and will override the frequency tuning for a specific protocol.
118 //Uncomment the lines below (remove the "//") and set an appropriate value (replace the "0") to enable. Valid range is -300 to +300 and default is 0.
119 //#define FORCE_AFHDS2A_TUNING 0
120 //#define FORCE_BUGS_TUNING 0
121 //#define FORCE_FLYSKY_TUNING 0
122 //#define FORCE_HEIGHT_TUNING 0
123 //#define FORCE_HUBSAN_TUNING 0
124 //#define FORCE_JOYSWAY_TUNING 0
125 //#define FORCE_KYOSHO_TUNING 0
126 //#define FORCE_PELIKAN_TUNING 0
127 //#define FORCE_WFLY2_TUNING 0
129 /** CYRF6936 Fine Frequency Tuning **/
130 //This is required in rare cases where some CYRF6936 modules and/or RXs have an inaccurate crystal oscillator.
131 //If using Serial mode only (for now), you can use CH15 to find the right tuning value. -100%=-300, 0%=default 0, +100%=+300.
132 //Uncomment the line below (remove the "//") to enable this feature.
133 //#define USE_CYRF6936_CH15_TUNING
135 /** Low Power **/
136 //Low power is reducing the transmit power of the multi module. This setting is configurable per model in PPM (table below) or Serial mode (radio GUI).
137 //It can be activated when flying indoor or small models since the distance is short or if a model is causing issues when flying closed to the TX.
138 //By default low power selection is enabled on all rf chips, but you can disable it by commenting (add //) the lines below if you don't want to risk
139 //flying a model with low power.
140 #define A7105_ENABLE_LOW_POWER
141 #define CYRF6936_ENABLE_LOW_POWER
142 #define CC2500_ENABLE_LOW_POWER
143 #define NRF24L01_ENABLE_LOW_POWER
146 /*****************/
147 /*** GLOBAL ID ***/
148 /*****************/
149 //A global ID is used by most protocols to bind and retain the bind to models. To prevent duplicate IDs, it is automatically
150 // generated using a random 32 bits number the first time the eeprom is initialized.
151 //If you have 2 Multi modules which you want to share the same ID so you can use either to control the same RC model
152 // then you can force the ID to a certain known value using the lines below.
153 //Default is commented, you should uncoment only for test purpose or if you know exactly what you are doing!!!
154 //The 8 numbers below can be anything between 0...9 and A..F
155 //#define FORCE_GLOBAL_ID 0x12345678
157 //Protocols using the CYRF6936 (DSM, Devo, Walkera...) are using the CYRF ID instead which should prevent duplicated IDs.
158 //If you have 2 Multi modules which you want to share the same ID so you can use either to control the same RC model
159 // then you can force the ID to a certain known value using the lines below.
160 //Default is commented, you should uncoment only for test purpose or if you know exactly what you are doing!!!
161 //#define FORCE_CYRF_ID "\x12\x34\x56\x78\x9A\xBC"
164 /****************************/
165 /*** PROTOCOLS TO INCLUDE ***/
166 /****************************/
167 //In this section select the protocols you want to be accessible when using the module.
168 //All the protocols will not fit in the STM32 or Atmega328p modules so you need to pick and choose.
169 //Comment the protocols you are not using with "//" to save Flash space.
171 //Already defined protocols selection
172 //#define MULTI_AIR //Only Air protocols will be available, all the others are disabled
173 //#define MULTI_SURFACE //Only Surface protocols will be available, all the others are disabled
174 //#define MULTI_EU //Only LBT/EU protocols will be available, all the others are disabled
176 //Protocol for module configuration
177 #define MULTI_CONFIG_INO
179 //The protocols below need an A7105 to be installed
180 #define AFHDS2A_A7105_INO
181 #define AFHDS2A_RX_A7105_INO
182 #define BUGS_A7105_INO
183 #define FLYSKY_A7105_INO
184 #define HEIGHT_A7105_INO
185 #define HUBSAN_A7105_INO
186 #define JOYSWAY_A7105_INO
187 #define KYOSHO_A7105_INO
188 #define PELIKAN_A7105_INO
189 #define WFLY2_A7105_INO
191 //The protocols below need a CYRF6936 to be installed
192 #define DEVO_CYRF6936_INO
193 #define DSM_CYRF6936_INO
194 #define DSM_RX_CYRF6936_INO
195 #define E010R5_CYRF6936_INO
196 #define E01X_CYRF6936_INO
197 #define E129_CYRF6936_INO
198 #define J6PRO_CYRF6936_INO
199 #define KYOSHO3_CYRF6936_INO
200 #define LOSI_CYRF6936_INO //Need DSM to be enabled
201 #define MLINK_CYRF6936_INO
202 #define SCORPIO_CYRF6936_INO
203 #define TRAXXAS_CYRF6936_INO
204 #define WFLY_CYRF6936_INO
205 #define WK2x01_CYRF6936_INO
207 //The protocols below need a CC2500 to be installed
208 #define CORONA_CC2500_INO
209 #define E016HV2_CC2500_INO
210 #define ESKY150V2_CC2500_INO
211 #define FRSKYL_CC2500_INO
212 #define FRSKYD_CC2500_INO
213 #define FRSKYV_CC2500_INO
214 #define FRSKYX_CC2500_INO
215 #define FRSKY_RX_CC2500_INO
216 #define HITEC_CC2500_INO
217 #define HOTT_CC2500_INO
218 //#define IKEAANSLUTA_CC2500_INO // This is mostly a "for-fun" kind of a thing, not needed for most users
219 #define SCANNER_CC2500_INO
220 #define FUTABA_CC2500_INO
221 #define SKYARTEC_CC2500_INO
222 #define REDPINE_CC2500_INO
223 #define RLINK_CC2500_INO
225 //The protocols below need a NRF24L01 to be installed
226 #define ASSAN_NRF24L01_INO
227 #define BAYANG_NRF24L01_INO
228 #define BAYANG_RX_NRF24L01_INO
229 #define BUGSMINI_NRF24L01_INO
230 #define CABELL_NRF24L01_INO
231 #define CFLIE_NRF24L01_INO
232 #define CG023_NRF24L01_INO
233 #define CX10_NRF24L01_INO //Include Q2X2 protocol
234 #define DM002_NRF24L01_INO
235 #define E016H_NRF24L01_INO
236 #define EAZYRC_NRF24L01_INO
237 #define ESKY_NRF24L01_INO
238 #define ESKY150_NRF24L01_INO
239 #define FQ777_NRF24L01_INO
240 #define FX_NRF24L01_INO
241 #define FY326_NRF24L01_INO
242 #define GW008_NRF24L01_INO
243 #define HISKY_NRF24L01_INO
244 #define HONTAI_NRF24L01_INO
245 #define H8_3D_NRF24L01_INO
246 #define JJRC345_NRF24L01_INO
247 #define KN_NRF24L01_INO
248 #define KYOSHO2_NRF24L01_INO
249 #define LOLI_NRF24L01_INO
250 #define MOULDKG_NRF24L01_INO
251 #define NCC1701_NRF24L01_INO
252 #define POTENSIC_NRF24L01_INO
253 #define PROPEL_NRF24L01_INO
254 #define REALACC_NRF24L01_INO
255 #define SGF22_NRF24L01_INO
256 #define SHENQI_NRF24L01_INO
257 #define SYMAX_NRF24L01_INO
258 #define V2X2_NRF24L01_INO
259 #define V761_NRF24L01_INO
260 #define XERALL_NRF24L01_INO
261 #define YD717_NRF24L01_INO
262 #define ZSX_NRF24L01_INO
264 //The protocols below need either a CC2500 or NRF24L01 to be installed
265 #define GD00X_CCNRF_INO
266 #define KF606_CCNRF_INO
267 #define MJXQ_CCNRF_INO
268 #define MT99XX_CCNRF_INO //Include MT99XX2 protocol
269 #define OMP_CCNRF_INO
270 #define Q303_CCNRF_INO
271 #define Q90C_CCNRF_INO
272 #define SLT_CCNRF_INO
273 #define V911S_CCNRF_INO
274 #define XK_CCNRF_INO
276 //The protocols below need a SX1276 to be installed
277 #define FRSKYR9_SX1276_INO
279 /***************************/
280 /*** PROTOCOLS SETTINGS ***/
281 /***************************/
283 //DSM specific settings
284 //---------------------
285 //The DSM protocol is using by default the Spektrum throw of 1100..1900us @100% and 1000..2000us @125%.
286 // For more throw, 1024..1976us @100% and 904..2096us @125%, remove the "//" on the line below. Be aware that too much throw can damage some UMX servos. To achieve standard throw in this mode use a channel weight of 84%.
287 //#define DSM_MAX_THROW
288 //Some models (X-Vert, Blade 230S...) require a special value to instant stop the motor(s).
289 // You can disable this feature by adding "//" on the line below. You have to specify which channel (14 by default) will be used to kill the throttle channel.
290 // If the channel 14 is above -50% the throttle is untouched but if it is between -50% and -100%, the throttle output will be forced between -100% and -150%.
291 // For example, a value of -80% applied on channel 14 will instantly kill the motors on the X-Vert.
292 #define DSM_THROTTLE_KILL_CH 14
294 //Enable DSM Forward Programming
295 #define DSM_FWD_PGM
297 //AFHDS2A specific settings
298 //-------------------------
299 //When enabled (remove the "//"), the below setting makes LQI (Link Quality Indicator) available on one of the RX ouput channel (5-14).
300 //#define AFHDS2A_LQI_CH 14
302 /**************************/
303 /*** FAILSAFE SETTINGS ***/
304 /**************************/
305 //The following protocols are supporting failsafe: FrSkyX, FrSkyX2, FRSKYR9, Devo, WK2x01, Futaba/SFHSS, HISKY/HK310, HoTT, LOLI, MLINK, WFLY, WFLY2 and AFHDS2A
306 //In Serial mode failsafe is configured on the radio itself.
307 //In PPM mode and only after the module is up and fully operational, press the bind button for at least 5sec to send all the current channels positions as failsafe to the RX.
308 //If you want to disable failsafe globally comment the line below using "//".
309 #define FAILSAFE_ENABLE
311 /**************************/
312 /*** TELEMETRY SETTINGS ***/
313 /**************************/
314 //In this section you can configure the telemetry.
316 //If you do not plan using the telemetry comment this global setting using "//" and skip to the next section.
317 #define TELEMETRY
319 //Comment to invert the polarity of the output telemetry serial signal.
320 //This function takes quite some flash space and processor power on an atmega.
321 //For a Taranis/T16 with an external module it must be uncommented. For a T16 internal module it must be commented.
322 //A 9XR_PRO running erskyTX will work with both commented and uncommented depending on the radio setting Invert COM1 under the Telemetry menu.
323 //On other addon/replacement boards like the 9xtreme board or the Ar9x board running erskyTX, you need to uncomment the line below.
324 //For er9x it depends if you have an inveter mod or not on the telemetry pin. If you don't have an inverter comment this line.
325 #define INVERT_TELEMETRY
326 //For STM32 and OrangeRX modules, comment to prevent the TX from forcing the serial telemetry polarity normal/invert.
327 #define INVERT_TELEMETRY_TX
329 //Sends Multi status and allow OpenTX and erskyTX to autodetect the telemetry format. Comment to disable.
330 #define MULTI_TELEMETRY
332 //Work in progress: Sync OpenTX frames with the current protocol timing. This feature is only available on the STM32 module. Uncomment to enable.
333 //#define MULTI_SYNC
335 //Comment a line to disable a specific protocol telemetry
336 #define DSM_TELEMETRY // Forward received telemetry packet directly to TX to be decoded by er9x, erskyTX and OpenTX
337 #define SPORT_TELEMETRY // Use FrSkyX format to send/receive telemetry
338 #define AFHDS2A_FW_TELEMETRY // Forward received telemetry packet directly to TX to be decoded by erskyTX and OpenTX
339 //#define AFHDS2A_HUB_TELEMETRY // Use FrSkyD Hub format to send basic telemetry to TX like er9x
340 #define HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
341 #define BAYANG_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
342 #define BUGS_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
343 #define DEVO_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
344 #define HUBSAN_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
345 #define NCC1701_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
346 #define OMP_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
347 #define V761_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
348 #define PROPEL_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
349 #define CABELL_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
350 #define RLINK_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
351 #define WFLY2_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
352 #define LOLI_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
353 #define MT99XX_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
354 //#define MLINK_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
355 #define MLINK_FW_TELEMETRY // Forward received telemetry packet directly to TX to be decoded by erskyTX and OpenTX
356 //#define HITEC_HUB_TELEMETRY // Use FrSkyD Hub format to send basic telemetry to the radios which can decode it like er9x, erskyTX and OpenTX
357 #define HITEC_FW_TELEMETRY // Forward received telemetry packets to be decoded by erskyTX and OpenTX
358 #define SCANNER_TELEMETRY // Forward spectrum scanner data to TX
359 #define FRSKY_RX_TELEMETRY // Forward channels data to TX
360 #define AFHDS2A_RX_TELEMETRY // Forward channels data to TX
361 #define HOTT_FW_TELEMETRY // Forward received telemetry packets to be decoded by erskyTX and OpenTX
362 #define BAYANG_RX_TELEMETRY // Forward channels data to TX
364 /**************************/
365 /*** TRAINER SETTINGS ***/
366 /**************************/
367 // By default Multi uses the telemetry line to send the received channels using a RX protocol (FrSky, DSM, AFHDS2A, Bayang) to the radio.
368 // But this does not work on FrSky radios since the telemetry lines of the internal and external modules are shared (hardware limitation).
369 // On a STM32 module and with a simple hardware modification, you can go around this limitation using CPPM to send the trainer information to the radio.
370 // Hardware modification: add a 1K resistor between the STM32 USART1 TX pin (Boot0 programming TX pin) and the radio bay pin 2.
371 //Comment to disable
372 #define SEND_CPPM
374 /****************************/
375 /*** SERIAL MODE SETTINGS ***/
376 /****************************/
377 //In this section you can configure the serial mode.
378 //The serial mode enables full editing of all the parameters in the GUI of the radio. It is enabled by placing the rotary switch on position 0.
379 //This is available natively for ER9X, ERSKY9X and OpenTX.
381 //If you do not plan to use the Serial mode comment this line using "//" to save Flash space
382 #define ENABLE_SERIAL
385 /*************************/
386 /*** PPM MODE SETTINGS ***/
387 /*************************/
388 //In this section you can configure all details about PPM.
389 //If you do not plan to use the PPM mode comment this line using "//" to save Flash space, you don't need to configure anything below in this case
390 #define ENABLE_PPM
392 /** TX END POINTS **/
393 //It is important for the module to know the endpoints of your radio.
394 //Below are some standard transmitters already preconfigured.
395 //Uncomment only the one which matches your transmitter.
396 #define TX_ER9X //ER9X/ERSKY9X/OpenTX ( 988<->2012 microseconds)
397 //#define TX_DEVO7 //DEVO (1120<->1920 microseconds)
398 //#define TX_SPEKTRUM //Spektrum (1100<->1900 microseconds)
399 //#define TX_HISKY //HISKY (1120<->1920 microseconds)
400 //#define TX_MPX //Multiplex MC2020 (1250<->1950 microseconds)
401 //#define TX_WALKERA //Walkera PL0811-01H (1000<->1800 microseconds)
402 //#define TX_CUSTOM //Custom
404 // The lines below are used to set the end points in microseconds if you have selected TX_CUSTOM.
405 // A few things to consider:
406 // - If you put too big values compared to your TX you won't be able to reach the extremes which is bad for throttle as an example
407 // - If you put too low values you won't be able to use your full stick range, it will be maxed out before reaching the ends
408 // - Centered stick value is usually 1500. It should match the middle between MIN and MAX, ie Center=(MAX+MIN)/2. If your TX is not centered you can adjust the value MIN or MAX.
409 // - 100% is referred as the value when the TX is set to default with no trims
410 #if defined(TX_CUSTOM)
411 #define PPM_MAX_100 1900 // 100%
412 #define PPM_MIN_100 1100 // 100%
413 #endif
415 /** Number of PPM Channels **/
416 // The line below is used to set the minimum number of channels which the module should receive to consider a PPM frame valid.
417 // The default value is 4 to receive at least AETR for flying models but you could also connect the PPM from a car radio which has only 3 channels by changing this number to 3.
418 #define MIN_PPM_CHANNELS 4
419 // The line below is used to set the maximum number of channels which the module should work with. Any channels received above this number are discarded.
420 // The default value is 16 to receive all possible channels but you might want to filter some "bad" channels from the PPM frame like the ones above 6 on the Walkera PL0811.
421 #define MAX_PPM_CHANNELS 16
423 /** Telemetry **/
424 //Send simple FrSkyX telemetry using the FrSkyD telemetry format
425 #define TELEMETRY_FRSKYX_TO_FRSKYD
427 /** Rotary Switch Protocol Selector Settings **/
428 //The table below indicates which protocol to run when a specific position on the rotary switch has been selected.
429 //All fields and values are explained below. Everything is configurable from here like in the Serial mode.
430 //Tip: You can associate multiple times the same protocol to different rotary switch positions to take advantage of the model match based on RX_Num
432 //A system of banks enable the access to more protocols than positions on the rotary switch. Banks can be selected by placing the rotary switch on position 15, power up the module and
433 // short press the bind button multiple times until you reach the desired one. The bank number currently selected is indicated by the number of LED flash.
434 // Full procedure is located here: https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/blob/master/Protocols_Details.md#protocol-selection-in-ppm-mode
436 //The parameter below indicates the number of desired banks between 1 and 5. Default is 1.
437 #define NBR_BANKS 1
439 const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
440 #if NBR_BANKS > 0
441 //****************************** BANK 1 ******************************
442 // Switch Protocol Sub protocol RX_Num Power Auto Bind Option Chan Order
443 /* 1 */ {PROTO_FLYSKY, Flysky , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
444 /* 2 */ {PROTO_AFHDS2A, PWM_IBUS , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 }, // RX number 0
445 /* 3 */ {PROTO_AFHDS2A, PWM_IBUS , 1 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 }, // RX number 1
446 /* 4 */ {PROTO_AFHDS2A, PWM_IBUS , 2 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 }, // RX number 2
447 /* 5 */ {PROTO_AFHDS2A, PWM_IBUS , 3 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 }, // RX number 3
448 /* 6 */ {PROTO_AFHDS2A, PWM_IBUS , 2 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 }, // RX number 4
449 /* 7 */ {PROTO_AFHDS2A, PWM_IBUS , 3 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 }, // RX number 5
450 /* 8 */ {PROTO_FUTABA, NONE , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 }, // option=fine freq tuning
451 /* 9 */ {PROTO_FRSKYV, NONE , 0 , P_HIGH , NO_AUTOBIND , 40 , 0x00000000 }, // option=fine freq tuning
452 /* 10 */ {PROTO_FRSKYD, NONE , 0 , P_HIGH , NO_AUTOBIND , 40 , 0x00000000 }, // option=fine freq tuning
453 /* 11 */ {PROTO_FRSKYX, CH_16 , 0 , P_HIGH , NO_AUTOBIND , 40 , 0x00000000 }, // option=fine freq tuning
454 /* 12 */ {PROTO_FRSKYX, EU_16 , 0 , P_HIGH , NO_AUTOBIND , 40 , 0x00000000 }, // option=fine freq tuning
455 /* 13 */ {PROTO_DEVO , NONE , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
456 /* 14 */ {PROTO_WK2x01, WK2801 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
457 #endif
458 #if NBR_BANKS > 1
459 //****************************** BANK 2 ******************************
460 // Switch Protocol Sub protocol RX_Num Power Auto Bind Option Chan Order
461 /* 1 */ {PROTO_DSM , DSM2_2F , 0 , P_HIGH , NO_AUTOBIND , 6 , 0x00000000 }, // option=number of channels
462 /* 2 */ {PROTO_DSM , DSM2_1F , 0 , P_HIGH , NO_AUTOBIND , 6 , 0x00000000 }, // option=number of channels
463 /* 3 */ {PROTO_DSM , DSMX_2F , 0 , P_HIGH , NO_AUTOBIND , 6 , 0x00000000 }, // option=number of channels
464 /* 4 */ {PROTO_DSM , DSMX_1F , 0 , P_HIGH , NO_AUTOBIND , 6 , 0x00000000 }, // option=number of channels
465 /* 5 */ {PROTO_DSM , DSM2_2F , 0 , P_HIGH , NO_AUTOBIND , 8 , 0x00000000 }, // option=number of channels
466 /* 6 */ {PROTO_DSM , DSM2_1F , 0 , P_HIGH , NO_AUTOBIND , 8 , 0x00000000 }, // option=number of channels
467 /* 7 */ {PROTO_DSM , DSMX_2F , 0 , P_HIGH , NO_AUTOBIND , 8 , 0x00000000 }, // option=number of channels
468 /* 8 */ {PROTO_DSM , DSMX_1F , 0 , P_HIGH , NO_AUTOBIND , 8 , 0x00000000 }, // option=number of channels
469 /* 9 */ {PROTO_SLT , SLT_V1 , 0 , P_HIGH , NO_AUTOBIND , 6 , 0x00000000 },
470 /* 10 */ {PROTO_HUBSAN, H107 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
471 /* 11 */ {PROTO_HUBSAN, H301 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
472 /* 12 */ {PROTO_HUBSAN, H501 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
473 /* 13 */ {PROTO_HISKY, Hisky , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
474 /* 14 */ {PROTO_V2X2 , NONE , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
475 #endif
476 #if NBR_BANKS > 2
477 //****************************** BANK 3 ******************************
478 // Switch Protocol Sub protocol RX_Num Power Auto Bind Option Chan Order
479 /* 1 */ {PROTO_ESKY , NONE , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
480 /* 2 */ {PROTO_ESKY150, NONE , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
481 /* 3 */ {PROTO_ASSAN, NONE , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
482 /* 4 */ {PROTO_CORONA, COR_V2 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
483 /* 5 */ {PROTO_SYMAX, SYMAX , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
484 /* 6 */ {PROTO_KN , WLTOYS , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
485 /* 7 */ {PROTO_BAYANG, BAYANG , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
486 /* 8 */ {PROTO_BAYANG, H8S3D , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
487 /* 9 */ {PROTO_BAYANG, X16_AH , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
488 /* 10 */ {PROTO_BAYANG, IRDRONE , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
489 /* 11 */ {PROTO_H8_3D, H8_3D , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
490 /* 12 */ {PROTO_H8_3D, H20H , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
491 /* 13 */ {PROTO_H8_3D, H20MINI , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
492 /* 14 */ {PROTO_H8_3D, H30MINI , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
493 #endif
494 #if NBR_BANKS > 3
495 //****************************** BANK 4 ******************************
496 // Switch Protocol Sub protocol RX_Num Power Auto Bind Option Chan Order
497 /* 1 */ {PROTO_MJXQ , WLH08 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
498 /* 2 */ {PROTO_MJXQ , X600 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
499 /* 3 */ {PROTO_MJXQ , X800 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
500 /* 4 */ {PROTO_MJXQ , H26D , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
501 /* 5 */ {PROTO_MJXQ , E010 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
502 /* 6 */ {PROTO_MJXQ , H26WH , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
503 /* 7 */ {PROTO_HONTAI, HONTAI , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
504 /* 8 */ {PROTO_HONTAI, JJRCX1 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
505 /* 9 */ {PROTO_HONTAI, X5C1 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
506 /* 10 */ {PROTO_HONTAI, FQ777_951 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
507 /* 11 */ {PROTO_Q303 , Q303 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
508 /* 12 */ {PROTO_Q303 , CX35 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
509 /* 13 */ {PROTO_Q303 , CX10D , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
510 /* 14 */ {PROTO_Q303 , CX10WD , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
511 #endif
512 #if NBR_BANKS > 4
513 //****************************** BANK 5 ******************************
514 // Switch Protocol Sub protocol RX_Num Power Auto Bind Option Chan Order
515 /* 1 */ {PROTO_CX10 , CX10_GREEN , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
516 /* 2 */ {PROTO_CX10 , CX10_BLUE , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
517 /* 3 */ {PROTO_CX10 , DM007 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
518 /* 4 */ {PROTO_CX10 , JC3015_1 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
519 /* 5 */ {PROTO_CX10 , JC3015_2 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
520 /* 6 */ {PROTO_CX10 , MK33041 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
521 /* 7 */ {PROTO_Q2X2 , Q222 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
522 /* 8 */ {PROTO_Q2X2 , Q242 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
523 /* 9 */ {PROTO_Q2X2 , Q282 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
524 /* 10 */ {PROTO_CG023, CG023 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
525 /* 11 */ {PROTO_CG023, YD829 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
526 /* 12 */ {PROTO_FQ777, NONE , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
527 /* 13 */ {PROTO_YD717, YD717 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
528 /* 14 */ {PROTO_MT99XX, MT99 , 0 , P_HIGH , NO_AUTOBIND , 0 , 0x00000000 },
529 #endif
531 // RX_Num is used for TX & RX match. Using different RX_Num values for each receiver will prevent starting a model with the false config loaded...
532 // RX_Num value is between 0 and 15.
534 // Power P_HIGH or P_LOW: High or low power setting for the transmission.
535 // For indoor P_LOW is more than enough.
537 // Auto Bind AUTOBIND or NO_AUTOBIND
538 // For protocols which does not require binding at each power up (like Flysky, FrSky...), you might still want a bind to be initiated each time you power up the TX.
539 // As an example, it's usefull for the WLTOYS F929/F939/F949/F959 (all using the Flysky protocol) which requires a bind at each power up.
540 // It also enables the Bind from channel feature, allowing to execute a bind by toggling a designated channel.
542 // Option: the value is between -128 and +127.
543 // The option value is only valid for some protocols, read this page for more information: https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/blob/master/Protocols_Details.md
545 // Chan order: if the value is different from 0, this setting will remap the first 8 channels in any given order before giving them to the protocol.
546 // It does not disable the automatic channel remapping of the protocol itself but changes the input of it.
547 // Even if your TX is sending less than 8 channels you have to respect the format like if it was.
548 // Examples:
549 // - 0x12345678 will give to the protocol the channels in the order 1,2,3,4,5,6,7,8 which is equivalent to 0x00000000.
550 // - 0x42315678 will give to the protocol the channels in the order 4,2,3,1,5,6,7,8 swapping channel 1 and 4.
551 // - 0x40010000 will give to the protocol the channels in the order 4,2,3,1,5,6,7,8 swapping channel 1 and 4. Note: 0 means leave the channel where it is.
552 // - 0x0000ABCD will give to the protocol the channels in the order 1,2,3,4,10,11,12,13 which potentially enables acces to channels not available on your TX. Note A=10,B=11,C=12,D=13,E=14,F=15.
554 /* Available protocols and associated sub protocols to pick and choose from (Listed in alphabetical order)
555 PROTO_AFHDS2A
556 PWM_IBUS
557 PPM_IBUS
558 PWM_SBUS
559 PPM_SBUS
560 PWM_IB16
561 PPM_IB16
562 PWM_SB16
563 PPM_SB16
564 PROTO_AFHDS2A_RX
565 NONE
566 PROTO_ASSAN
567 NONE
568 PROTO_BAYANG
569 BAYANG
570 H8S3D
571 X16_AH
572 IRDRONE
573 DHD_D4
574 QX100
575 PROTO_BAYANG_RX
576 NONE
577 PROTO_BLUEFLY
578 NONE
579 PROTO_BUGS
580 NONE
581 PROTO_BUGSMINI
582 BUGSMINI
583 BUGS3H
584 PROTO_CABELL
585 CABELL_V3
586 CABELL_V3_TELEMETRY
587 CABELL_SET_FAIL_SAFE
588 CABELL_UNBIND
589 PROTO_CFLIE
590 NONE
591 PROTO_CG023
592 CG023
593 YD829
594 PROTO_CORONA
595 COR_V1
596 COR_V2
597 FD_V3
598 PROTO_CX10
599 CX10_GREEN
600 CX10_BLUE
601 DM007
602 JC3015_1
603 JC3015_2
604 MK33041
605 PROTO_DEVO
606 NONE
607 PROTO_DM002
608 NONE
609 PROTO_DSM
610 DSM2_1F
611 DSM2_2F
612 DSMX_1F
613 DSMX_2F
614 DSMR
615 DSM2_SFC
616 PROTO_DSM_RX
617 DSM_RX
618 DSM_CLONE
619 DSM_ERASE
620 PROTO_E010R5
621 NONE
622 PROTO_E016H
623 NONE
624 PROTO_E016HV2
625 NONE
626 PROTO_E01X
627 E012
628 E015
629 PROTO_E129
630 E129_E129
631 E129_C186
632 PROTO_EAZYRC
633 NONE
634 PROTO_ESKY
635 ESKY_STD
636 ESKY_ET4
637 PROTO_ESKY150
638 ESKY150_4CH
639 ESKY150_7CH
640 PROTO_ESKY150V2
641 NONE
642 PROTO_FLYSKY
643 Flysky
644 V9X9
645 V6X6
646 V912
647 CX20
648 PROTO_FQ777
649 NONE
650 PROTO_FRSKY_RX
651 FRSKY_RX
652 FRSKY_CLONE
653 PROTO_FRSKYD
654 FRSKYD
655 DCLONE
656 PROTO_FRSKYL
657 LR12
658 LR12_6CH
659 PROTO_FRSKYR9
660 R9_915
661 R9_868
662 R9_915_8CH
663 R9_868_8CH
664 R9_FCC
665 R9_EU
666 R9_FCC_8CH
667 R9_EU_8CH
668 PROTO_FRSKYV
669 NONE
670 PROTO_FRSKYX
671 CH_16
672 CH_8
673 EU_16
674 EU_8
675 XCLONE_16
676 XCLONE_8
677 PROTO_FRSKYX2
678 CH_16
679 CH_8
680 EU_16
681 EU_8
682 XCLONE
683 PROTO_FRSKY_RX
684 FRSKY_RX
685 FRSKY_CLONE
686 PROTO_FUTABA
687 NONE
688 PROTO_FX
689 FX816
690 FX620
691 FX9630
692 PROTO_FY326
693 FY326
694 FY319
695 PROTO_GD00X
696 GD_V1
697 GD_V2
698 PROTO_GW008
699 NONE
700 PROTO_H8_3D
701 H8_3D
702 H20H
703 H20MINI
704 H30MINI
705 PROTO_HEIGHT
706 HEIGHT_5CH
707 HEIGHT_8CH
708 PROTO_HISKY
709 Hisky
710 HK310
711 PROTO_HITEC
712 OPT_FW
713 OPT_HUB
714 MINIMA
715 PROTO_HONTAI
716 HONTAI
717 JJRCX1
718 X5C1
719 FQ777_951
720 PROTO_HOTT
721 HOTT_SYNC
722 HOTT_NO_SYNC
723 PROTO_HUBSAN
724 H107
725 H301
726 H501
727 PROTO_IKEAANSLUTA
728 NONE
729 PROTO_J6PRO
730 NONE
731 PROTO_JJRC345
732 JJRC345
733 SKYTMBLR
734 PROTO_JOYSWAY
735 NONE
736 PROTO_KF606
737 KF606_KF606
738 KF606_MIG320
739 KF606_ZCZ50
740 PROTO_KN
741 WLTOYS
742 FEILUN
743 PROTO_KYOSHO
744 KYOSHO_FHSS
745 KYOSHO_HYPE
746 PROTO_KYOSHO2
747 NONE
748 PROTO_KYOSHO3
749 NONE
750 PROTO_LOLI
751 NONE
752 PROTO_LOSI
753 NONE
754 PROTO_MJXQ
755 WLH08
756 X600
757 X800
758 H26D
759 E010
760 H26WH
761 PHOENIX
762 PROTO_MLINK
763 NONE
764 PROTO_MOULDKG
765 MOULDKG_ANALOG
766 MOULDKG_DIGIT
767 PROTO_MT99XX
768 MT99
772 FY805
773 A180
774 DRAGON
775 F949G
776 PROTO_MT99XX2
777 PA18
778 PROTO_NCC1701
779 NONE
780 PROTO_OMP
781 NONE
782 PROTO_PELIKAN
783 PELIKAN_PRO
784 PELIKAN_LITE
785 PELIKAN_SCX24
786 PROTO_POTENSIC
787 NONE
788 PROTO_PROPEL
789 NONE
790 PROTO_Q2X2
791 Q222
792 Q242
793 Q282
794 PROTO_Q303
795 Q303
796 CX35
797 CX10D
798 CX10WD
799 PROTO_Q90C
800 NONE
801 PROTO_REALACC
802 NONE
803 PROTO_REDPINE
804 RED_FAST
805 RED_SLOW
806 PROTO_RLINK
807 RLINK_SURFACE
808 RLINK_AIR
809 RLINK_DUMBORC
810 RLINK_RC4G
811 PROTO_SCANNER
812 NONE
813 PROTO_SCORPIO
814 NONE
815 PROTO_SGF22
816 NONE
817 PROTO_SHENQI
818 NONE
819 PROTO_SKYARTEC
820 NONE
821 PROTO_SLT
822 SLT_V1
823 SLT_V2
824 Q100
825 Q200
826 MR100
827 PROTO_SYMAX
828 SYMAX
829 SYMAX5C
830 PROTO_TRAXXAS
831 NONE
832 PROTO_V2X2
833 V2X2
834 JXD506
835 V2X2_MR101
836 PROTO_V761
837 V761_3CH
838 V761_4CH
839 PROTO_V911S
840 V911S_STD
841 V911S_E119
842 PROTO_WFLY
843 NONE
844 PROTO_WFLY2
845 NONE
846 PROTO_WK2x01
847 WK2801
848 WK2401
849 W6_5_1
850 W6_6_1
851 W6_HEL
852 W6_HEL_I
853 PROTO_XERALL
854 NONE
855 PROTO_XK
856 X450
857 X420
858 XK_CARS
859 PROTO_YD717
860 YD717
861 SKYWLKR
862 SYMAX4
863 XINXUN
864 NIHUI
865 PROTO_ZSX
866 NONE
869 /**********************************/
870 /*** DIRECT INPUTS SETTINGS ***/
871 /**********************************/
872 //In this section you can configure the direct inputs.
873 //It enables switches wired directly to the board
874 //Direct inputs works only in ppm mode and only for stm_32 boards
875 //Uncomment following lines to enable derect inputs or define your own configuration in _MyConfig.h
877 #define ENABLE_DIRECT_INPUTS
879 #define DI1_PIN PC13
880 #define IS_DI1_on (digitalRead(DI1_PIN)==LOW)
882 #define DI2_PIN PC14
883 #define IS_DI2_on (digitalRead(DI2_PIN)==LOW)
885 #define DI3_PIN PC15
886 #define IS_DI3_on (digitalRead(DI3_PIN)==LOW)
888 //Define up to 4 direct input channels
889 //CHANNEL1 - 2pos switch
890 #define DI_CH1_read IS_DI1_on ? PPM_MAX_100*2 : PPM_MIN_100*2
891 //CHANNEL2 - 3pos switch
892 #define DI_CH2_read IS_DI2_on ? PPM_MAX_100*2 : (IS_DI2_on ? PPM_MAX_100 + PPM_MIN_100 : PPM_MIN_100*2)