2016-10-16 19:51:42 +02:00
// Check selected board type
# if defined (STM32_BOARD) && defined (ORANGE_TX)
# error You must comment the board type STM32_BOARD in _Config.h to compile ORANGE_TX
# endif
# if not defined (ORANGE_TX) && not defined (STM32_BOARD)
//Atmega328p
2020-07-31 15:58:07 +02:00
# if not defined(ARDUINO_AVR_PRO) && not defined(ARDUINO_MULTI_NO_BOOT) && not defined(ARDUINO_MULTI_FLASH_FROM_TX) && not defined(ARDUINO_AVR_MINI) && not defined(ARDUINO_AVR_NANO) && not defined(ARDUINO_AVR_DUEMILANOVE)
2016-10-18 09:27:14 +02:00
# error You must select one of these boards: "Multi 4-in-1", "Arduino Pro or Pro Mini" or "Arduino Mini"
2016-10-16 19:51:42 +02:00
# endif
2020-08-01 19:35:39 +02:00
# if F_CPU != 16000000L || not (defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__))
2016-10-16 19:51:42 +02:00
# error You must select the processor type "ATmega328(5V, 16MHz)"
# endif
# endif
# if defined (STM32_BOARD) && not defined (ORANGE_TX)
//STM32
2018-08-10 20:11:32 +01:00
# if not defined(ARDUINO_GENERIC_STM32F103C) && not defined(ARDUINO_MULTI_STM32_FLASH_FROM_TX) && not defined(ARDUINO_MULTI_STM32_NO_BOOT) && not defined(ARDUINO_MULTI_STM32_WITH_BOOT)
2017-11-27 21:19:49 +00:00
# error You must select one of these boards: "Multi 4-in-1 (STM32F103CB)" or "Generic STM32F103C series"
2016-10-16 19:51:42 +02:00
# endif
# endif
2019-08-01 14:23:08 +02:00
// Check for minimum board file definition version for DIY multi-module boards
2019-10-04 10:14:52 +02:00
# define MIN_AVR_BOARD 110
# define MIN_ORX_BOARD 110
# define MIN_STM32_BOARD 117
2017-12-20 11:31:20 +00:00
//AVR
# if (defined(ARDUINO_MULTI_NO_BOOT) && ARDUINO_MULTI_NO_BOOT < MIN_AVR_BOARD) || (defined(ARDUINO_MULTI_FLASH_FROM_TX) && ARDUINO_MULTI_FLASH_FROM_TX < MIN_AVR_BOARD)
# error You need to update your Multi 4-in-1 board definition. Open Boards Manager and update to the latest version of the Multi 4-in-1 AVR Boards.
# endif
//OrangeRX
# if (defined(ARDUINO_MULTI_ORANGERX) && ARDUINO_MULTI_ORANGERX < MIN_ORX_BOARD)
# error You need to update your Multi 4-in-1 board definition. Open Boards Manager and update to the latest version of the Multi 4-in-1 AVR Boards.
# endif
//STM32
2018-08-10 20:11:32 +01:00
# if (defined(ARDUINO_MULTI_STM32_NO_BOOT) && ARDUINO_MULTI_STM32_NO_BOOT < MIN_STM32_BOARD) || (defined(ARDUINO_MULTI_STM32_FLASH_FROM_TX) && ARDUINO_MULTI_STM32_FLASH_FROM_TX < MIN_STM32_BOARD) || (defined(ARDUINO_MULTI_STM32_WITH_BOOT) && ARDUINO_MULTI_STM32_WITH_BOOT < MIN_STM32_BOARD)
2017-12-20 11:31:20 +00:00
# error You need to update your Multi 4-in-1 board definition. Open Boards Manager and update to the latest version of the Multi 4-in-1 STM32 Board.
# endif
2019-09-06 13:05:57 +01:00
// Enable serial debugging if a debugging option was chosen in the IDE
# ifdef ARDUINO_MULTI_DEBUG
# define DEBUG_SERIAL
# endif
2017-11-28 10:13:52 +00:00
// Error if CHECK_FOR_BOOTLOADER is not enabled but a FLASH_FROM_TX board is selected
# if (defined(ARDUINO_MULTI_FLASH_FROM_TX) || defined(ARDUINO_MULTI_STM32_FLASH_FROM_TX)) &! defined(CHECK_FOR_BOOTLOADER)
# if defined(STM32_BOARD)
2017-12-07 21:42:23 +01:00
# error "You have selected the 'Flash from TX' upload method but not enabled CHECK_FOR_BOOTLOADER."
# else
# error "You have selected the 'Flash from TX' bootloader but not enabled CHECK_FOR_BOOTLOADER."
# endif
2017-11-20 17:04:38 +01:00
# endif
2017-11-28 09:21:03 +00:00
2019-08-24 21:50:36 +02:00
// Warning if CHECK_FOR_BOOTLOADER is enabled but no bootloader
2018-01-24 10:17:23 +01:00
# if defined(ARDUINO_MULTI_NO_BOOT) && defined(CHECK_FOR_BOOTLOADER)
2019-08-24 21:50:36 +02:00
# undef CHECK_FOR_BOOTLOADER
# warning "Disabling CHECK_FOR_BOOTLOADER since no bootloader is selected."
2017-12-07 21:42:23 +01:00
# endif
2018-01-30 12:02:45 +01:00
//Check number of banks
# if NBR_BANKS < 1 || NBR_BANKS > 5
# error "You need to select a number of banks between 1 and 5."
# endif
2017-12-07 21:42:23 +01:00
//Check failsafe throttle value
# ifdef FAILSAFE_ENABLE
# if ( FAILSAFE_THROTTLE_LOW < -125 ) || ( FAILSAFE_THROTTLE_LOW > 125 )
# error "The failsafe value for throttle is outside of the range -125..125."
# endif
2017-11-20 17:04:38 +01:00
# endif
2017-12-19 19:14:49 +00:00
// Check forced tuning values are valid
2019-08-17 22:37:00 +02:00
//CC2500
# ifdef FORCE_CORONA_TUNING
# if ( FORCE_CORONA_TUNING < -127 ) || ( FORCE_CORONA_TUNING > 127 )
# error "The CORONA forced frequency tuning value is outside of the range -127..127."
# endif
# endif
2017-12-19 19:14:49 +00:00
# ifdef FORCE_FRSKYD_TUNING
# if ( FORCE_FRSKYD_TUNING < -127 ) || ( FORCE_FRSKYD_TUNING > 127 )
# error "The FrSkyD forced frequency tuning value is outside of the range -127..127."
# endif
# endif
2020-04-15 01:30:06 +02:00
# ifdef FORCE_FRSKYL_TUNING
# if ( FORCE_FRSKYL_TUNING < -127 ) || ( FORCE_FRSKYL_TUNING > 127 )
# error "The FrSkyL forced frequency tuning value is outside of the range -127..127."
# endif
# endif
2017-12-19 19:14:49 +00:00
# ifdef FORCE_FRSKYV_TUNING
# if ( FORCE_FRSKYV_TUNING < -127 ) || ( FORCE_FRSKYV_TUNING > 127 )
# error "The FrSkyV forced frequency tuning value is outside of the range -127..127."
# endif
# endif
# ifdef FORCE_FRSKYX_TUNING
# if ( FORCE_FRSKYX_TUNING < -127 ) || ( FORCE_FRSKYX_TUNING > 127 )
# error "The FrSkyX forced frequency tuning value is outside of the range -127..127."
# endif
# endif
2019-08-17 22:37:00 +02:00
# ifdef FORCE_HITEC_TUNING
# if ( FORCE_HITEC_TUNING < -127 ) || ( FORCE_HITEC_TUNING > 127 )
# error "The HITEC forced frequency tuning value is outside of the range -127..127."
2018-01-03 13:04:58 +01:00
# endif
# endif
2020-04-18 19:04:38 +02:00
# ifdef FORCE_HOTT_TUNING
# if ( FORCE_HOTT_TUNING < -127 ) || ( FORCE_HOTT_TUNING > 127 )
# error "The HOTT forced frequency tuning value is outside of the range -127..127."
# endif
# endif
2019-06-17 17:16:39 +02:00
# ifdef FORCE_REDPINE_TUNING
# if ( FORCE_REDPINE_TUNING < -127 ) || ( FORCE_REDPINE_TUNING > 127 )
# error "The REDPINE forced frequency tuning value is outside of the range -127..127."
# endif
# endif
2020-07-31 10:41:07 +02:00
# ifdef FORCE_RADIOLINK_TUNING
# if ( FORCE_RADIOLINK_TUNING < -127 ) || ( FORCE_RADIOLINK_TUNING > 127 )
# error "The RADIOLINK forced frequency tuning value is outside of the range -127..127."
# endif
# endif
2020-10-30 12:01:29 +01:00
# ifdef FORCE_FUTABA_TUNING
# if ( FORCE_FUTABA_TUNING < -127 ) || ( FORCE_FUTABA_TUNING > 127 )
2020-10-31 15:59:04 +01:00
# error "The Futaba forced frequency tuning value is outside of the range -127..127."
2019-08-17 22:37:00 +02:00
# endif
# endif
2020-04-18 19:04:38 +02:00
# ifdef FORCE_SKYARTEC_TUNING
# if ( FORCE_SKYARTEC_TUNING < -127 ) || ( FORCE_SKYARTEC_TUNING > 127 )
# error "The SKYARTEC forced frequency tuning value is outside of the range -127..127."
2019-11-02 20:51:41 +01:00
# endif
# endif
2019-08-17 22:37:00 +02:00
//A7105
# ifdef FORCE_AFHDS2A_TUNING
# if ( FORCE_AFHDS2A_TUNING < -300 ) || ( FORCE_AFHDS2A_TUNING > 300 )
# error "The AFHDS2A forced frequency tuning value is outside of the range -300..300."
# endif
# endif
# ifdef FORCE_BUGS_TUNING
# if ( FORCE_BUGS_TUNING < -300 ) || ( FORCE_BUGS_TUNING > 300 )
# error "The BUGS forced frequency tuning value is outside of the range -300..300."
2018-08-03 18:29:24 +02:00
# endif
# endif
2018-01-04 14:37:05 +01:00
# ifdef FORCE_FLYSKY_TUNING
# if ( FORCE_FLYSKY_TUNING < -300 ) || ( FORCE_FLYSKY_TUNING > 300 )
# error "The Flysky forced frequency tuning value is outside of the range -300..300."
# endif
# endif
2020-08-01 19:19:11 +02:00
# ifdef FORCE_HEIGHT_TUNING
# if ( FORCE_HEIGHT_TUNING < -300 ) || ( FORCE_HEIGHT_TUNING > 300 )
# error "The Height forced frequency tuning value is outside of the range -300..300."
2019-08-17 22:37:00 +02:00
# endif
# endif
2019-12-20 15:43:44 +01:00
# ifdef FORCE_PELIKAN_TUNING
# if ( FORCE_PELIKAN_TUNING < -300 ) || ( FORCE_PELIKAN_TUNING > 300 )
# error "The Pelikan forced frequency tuning value is outside of the range -300..300."
# endif
# endif
2018-01-04 14:37:05 +01:00
# ifdef FORCE_HUBSAN_TUNING
# if ( FORCE_HUBSAN_TUNING < -300 ) || ( FORCE_HUBSAN_TUNING > 300 )
# error "The Hubsan forced frequency tuning value is outside of the range -300..300."
# endif
# endif
2021-03-02 10:00:33 +01:00
# ifdef FORCE_JOYSWAY_TUNING
# if ( FORCE_JOYSWAY_TUNING < -300 ) || ( FORCE_JOYSWAY_TUNING > 300 )
# error "The JOYSWAY forced frequency tuning value is outside of the range -300..300."
# endif
# endif
2020-07-10 15:25:32 +02:00
# ifdef FORCE_KYOSHO_TUNING
# if ( FORCE_KYOSHO_TUNING < -300 ) || ( FORCE_KYOSHO_TUNING > 300 )
# error "The Kyosho forced frequency tuning value is outside of the range -300..300."
# endif
# endif
2020-12-13 23:15:43 +01:00
# ifdef FORCE_WFLY2_TUNING
# if ( FORCE_WFLY2_TUNING < -300 ) || ( FORCE_WFLY2_TUNING > 300 )
# error "The WFLY2 forced frequency tuning value is outside of the range -300..300."
2020-12-10 16:51:55 +01:00
# endif
# endif
2019-08-17 22:37:00 +02:00
2018-01-04 14:37:05 +01:00
# ifndef USE_A7105_CH15_TUNING
2019-08-17 22:37:00 +02:00
# ifndef FORCE_BUGS_TUNING
# define FORCE_BUGS_TUNING 0
# endif
2018-01-04 14:37:05 +01:00
# ifndef FORCE_FLYSKY_TUNING
# define FORCE_FLYSKY_TUNING 0
# endif
2020-08-01 19:19:11 +02:00
# ifndef FORCE_HEIGHT_TUNING
# define FORCE_HEIGHT_TUNING 0
2019-08-17 22:37:00 +02:00
# endif
2019-12-20 15:43:44 +01:00
# ifndef FORCE_PELIKAN_TUNING
# define FORCE_PELIKAN_TUNING 0
# endif
2021-03-02 10:00:33 +01:00
# ifndef FORCE_JOYSWAY_TUNING
# define FORCE_JOYSWAY_TUNING 0
# endif
2020-07-10 15:25:32 +02:00
# ifndef FORCE_KYOSHO_TUNING
# define FORCE_KYOSHO_TUNING 0
# endif
2020-12-13 23:15:43 +01:00
# ifndef FORCE_WFLY2_TUNING
# define FORCE_WFLY2_TUNING 0
2020-12-10 16:51:55 +01:00
# endif
2018-01-04 14:37:05 +01:00
# ifndef FORCE_HUBSAN_TUNING
# define FORCE_HUBSAN_TUNING 0
# endif
# ifndef FORCE_AFHDS2A_TUNING
# define FORCE_AFHDS2A_TUNING 0
# endif
# endif
2017-12-19 19:14:49 +00:00
2019-08-01 14:23:08 +02:00
# if defined (USE_CYRF6936_CH15_TUNING) && (DSM_THROTTLE_KILL_CH == 15)
# error "Error Channel 15 conflict between the CYRF6936 freq tuning and the DSM throttle kill feature."
# endif
2016-10-16 19:51:42 +02:00
//Change/Force configuration if OrangeTX
# ifdef ORANGE_TX
# undef ENABLE_PPM // Disable PPM for OrangeTX module
# undef A7105_INSTALLED // Disable A7105 for OrangeTX module
2017-02-21 00:29:40 +01:00
# undef A7105_CSN_pin
2016-10-16 19:51:42 +02:00
# undef CC2500_INSTALLED // Disable CC2500 for OrangeTX module
2017-02-21 00:29:40 +01:00
# undef CC25_CSN_pin
2016-10-16 19:51:42 +02:00
# undef NRF24L01_INSTALLED // Disable NRF for OrangeTX module
2017-02-21 00:29:40 +01:00
# undef NRF_CSN_pin
2020-06-06 01:57:52 +02:00
# undef SX1276_INSTALLED // Disable SX1276 for OrangeTX module
2016-10-16 19:51:42 +02:00
# define TELEMETRY // Enable telemetry
# define INVERT_TELEMETRY // Enable invert telemetry
# define DSM_TELEMETRY // Enable DSM telemetry
# endif
2020-06-06 01:57:52 +02:00
//Change/Force RF chip configuration if MULTI_5IN1_INTERNAL
# ifdef MULTI_5IN1_INTERNAL
# if not defined(STM32_BOARD)
# error "Error MULTI_5IN1_INTERNAL is only for STM32 boards."
# endif
2021-02-21 18:56:48 +01:00
# if ! (MULTI_5IN1_INTERNAL + 0)
2021-02-21 18:35:24 +01:00
# define MULTI_5IN1_INTERNAL JP_T18 // make JP_T18 default if it has not been explicitly declared
# endif
2021-02-21 18:56:48 +01:00
# if MULTI_5IN1_INTERNAL > JP_TLite
# error "Invalid value for MULTI_5IN1_INTERNAL."
# endif
2020-06-06 01:57:52 +02:00
# define A7105_INSTALLED
# define CYRF6936_INSTALLED
# define CC2500_INSTALLED
# define NRF24L01_INSTALLED
# define SX1276_INSTALLED
2021-09-01 01:39:26 +02:00
# undef ENABLE_PPM
# undef SEND_CPPM
2020-06-06 01:57:52 +02:00
# endif
2016-10-16 19:51:42 +02:00
//Make sure protocols are selected correctly
2022-11-17 10:29:53 +01:00
# if not defined(A7105_INSTALLED) || defined MULTI_EU
2022-07-20 17:20:27 +02:00
# undef AFHDS2A_A7105_INO
2022-11-17 10:29:53 +01:00
# if not defined(A7105_INSTALLED)
# undef AFHDS2A_RX_A7105_INO
# endif
2022-07-20 17:20:27 +02:00
# undef BUGS_A7105_INO
# undef FLYSKY_A7105_INO
# undef HEIGHT_A7105_INO
# undef HUBSAN_A7105_INO
# undef JOYSWAY_A7105_INO
# undef KYOSHO_A7105_INO
# undef PELIKAN_A7105_INO
# undef WFLY2_A7105_INO
2016-10-16 19:51:42 +02:00
# endif
2022-11-17 10:29:53 +01:00
# if not defined(CYRF6936_INSTALLED) || defined MULTI_EU
2016-10-16 19:51:42 +02:00
# undef DEVO_CYRF6936_INO
2022-11-17 10:29:53 +01:00
# if not defined(CYRF6936_INSTALLED)
# undef DSM_CYRF6936_INO
# undef DSM_RX_CYRF6936_INO
# endif
2021-01-08 21:16:07 +01:00
# undef E010R5_CYRF6936_INO
2021-11-13 19:03:01 +01:00
# undef E01X_CYRF6936_INO
2021-01-16 15:45:19 +01:00
# undef E129_CYRF6936_INO
2016-10-16 19:51:42 +02:00
# undef J6PRO_CYRF6936_INO
2021-05-03 15:29:24 +02:00
# undef LOSI_CYRF6936_INO
2020-12-04 09:00:17 +01:00
# undef MLINK_CYRF6936_INO
2020-04-18 19:04:38 +02:00
# undef TRAXXAS_CYRF6936_INO
2023-06-04 12:02:37 +02:00
# undef SCORPIO_CYRF6936_INO
2018-08-21 14:58:44 +02:00
# undef WFLY_CYRF6936_INO
2017-01-03 19:19:53 +01:00
# undef WK2x01_CYRF6936_INO
2016-10-16 19:51:42 +02:00
# endif
2022-11-17 10:29:53 +01:00
# if not defined(CC2500_INSTALLED) || defined MULTI_EU
2020-04-18 19:04:38 +02:00
# undef CORONA_CC2500_INO
2021-01-21 11:46:54 +01:00
# undef E016HV2_CC2500_INO
2020-05-08 19:55:16 +02:00
# undef ESKY150V2_CC2500_INO
2016-10-16 19:51:42 +02:00
# undef FRSKYD_CC2500_INO
2020-04-11 20:09:32 +02:00
# undef FRSKYL_CC2500_INO
2016-10-16 19:51:42 +02:00
# undef FRSKYV_CC2500_INO
2022-11-17 10:29:53 +01:00
# if not defined(CC2500_INSTALLED)
# undef FRSKYX_CC2500_INO
# undef FRSKY_RX_CC2500_INO
# endif
2020-04-18 19:04:38 +02:00
# undef HITEC_CC2500_INO
2022-11-17 10:29:53 +01:00
# if not defined(CC2500_INSTALLED)
# undef HOTT_CC2500_INO
# endif
2021-05-04 10:39:13 +02:00
# undef IKEAANSLUTA_CC2500_INO
2020-04-18 19:04:38 +02:00
# undef REDPINE_CC2500_INO
2020-07-22 15:37:47 +02:00
# undef RLINK_CC2500_INO
2022-11-17 10:29:53 +01:00
# if not defined(CC2500_INSTALLED)
# undef SCANNER_CC2500_INO
# endif
2020-10-30 12:01:29 +01:00
# undef FUTABA_CC2500_INO
2020-04-18 19:04:38 +02:00
# undef SKYARTEC_CC2500_INO
2016-10-16 19:51:42 +02:00
# endif
2022-11-17 10:29:53 +01:00
# if not defined(NRF24L01_INSTALLED) || defined MULTI_EU
2020-04-18 19:04:38 +02:00
# undef ASSAN_NRF24L01_INO
2016-10-16 19:51:42 +02:00
# undef BAYANG_NRF24L01_INO
2022-11-17 10:29:53 +01:00
# if not defined(NRF24L01_INSTALLED)
# undef BAYANG_RX_NRF24L01_INO
# endif
2020-04-18 19:04:38 +02:00
# undef BUGSMINI_NRF24L01_INO
# undef CABELL_NRF24L01_INO
# undef CFLIE_NRF24L01_INO
2016-10-16 19:51:42 +02:00
# undef CG023_NRF24L01_INO
# undef CX10_NRF24L01_INO
2020-04-18 19:04:38 +02:00
# undef DM002_NRF24L01_INO
2021-03-17 17:05:42 +01:00
# undef E016H_NRF24L01_INO
2016-10-16 19:51:42 +02:00
# undef ESKY_NRF24L01_INO
2020-04-18 19:04:38 +02:00
# undef ESKY150_NRF24L01_INO
# undef FQ777_NRF24L01_INO
2022-07-11 09:03:31 +02:00
# undef FX_NRF24L01_INO
2020-04-18 19:04:38 +02:00
# undef FY326_NRF24L01_INO
# undef GW008_NRF24L01_INO
# undef H8_3D_NRF24L01_INO
2016-10-16 19:51:42 +02:00
# undef HISKY_NRF24L01_INO
2020-04-18 19:04:38 +02:00
# undef HONTAI_NRF24L01_INO
2020-05-21 11:47:51 +02:00
# undef JJRC345_NRF24L01_INO
2016-10-16 19:51:42 +02:00
# undef KN_NRF24L01_INO
2022-07-20 17:20:27 +02:00
# undef KYOSHO2_NRF24L01_INO
2021-01-09 18:39:31 +01:00
# undef LOLI_NRF24L01_INO
2021-05-04 10:39:13 +02:00
# undef MOULDKG_NRF24L01_INO
2020-04-18 19:04:38 +02:00
# undef NCC1701_NRF24L01_INO
# undef POTENSIC_NRF24L01_INO
# undef PROPEL_NRF24L01_INO
2020-08-10 23:54:33 +02:00
# undef REALACC_NRF24L01_INO
2020-04-18 19:04:38 +02:00
# undef SHENQI_NRF24L01_INO
2016-10-16 19:51:42 +02:00
# undef SYMAX_NRF24L01_INO
2020-04-18 19:04:38 +02:00
# undef TIGER_NRF24L01_INO
2016-10-16 19:51:42 +02:00
# undef V2X2_NRF24L01_INO
2019-05-17 16:25:39 +02:00
# undef V761_NRF24L01_INO
2021-08-26 22:33:38 +02:00
# undef XERALL_NRF24L01_INO
2020-04-18 19:04:38 +02:00
# undef YD717_NRF24L01_INO
# undef ZSX_NRF24L01_INO
2016-10-16 19:51:42 +02:00
# endif
2022-11-17 10:29:53 +01:00
# if ( not defined(CC2500_INSTALLED) && not defined(NRF24L01_INSTALLED) ) || defined MULTI_EU
2021-02-16 19:06:23 +01:00
# undef GD00X_CCNRF_INO
# undef KF606_CCNRF_INO
2021-03-17 17:05:42 +01:00
# undef MJXQ_CCNRF_INO
# undef MT99XX_CCNRF_INO
# undef OMP_CCNRF_INO
# undef Q303_CCNRF_INO
2021-02-16 19:06:23 +01:00
# undef Q90C_CCNRF_INO
# undef SLT_CCNRF_INO
# undef V911S_CCNRF_INO
2021-03-17 17:05:42 +01:00
# undef XK_CCNRF_INO
2021-02-16 19:06:23 +01:00
# endif
2021-06-30 09:45:25 +02:00
# if not defined(STM32_BOARD)
//RF2500 emulation does not work on atmega...
# undef E010R5_CYRF6936_INO
# undef E129_CYRF6936_INO
# endif
2020-01-24 12:12:07 +01:00
# if not defined(STM32_BOARD)
# undef SX1276_INSTALLED
# endif
2023-06-04 12:07:27 +02:00
# if not defined(SX1276_INSTALLED) || defined MULTI_EU
2020-01-24 12:12:07 +01:00
# undef FRSKYR9_SX1276_INO
# endif
2016-10-16 19:51:42 +02:00
2020-04-16 17:03:17 +02:00
//OpenTX 2.3.x issue
# if defined (FRSKYD_CC2500_INO) || defined(FRSKYV_CC2500_INO) || defined(FRSKYX_CC2500_INO)
# define FRSKYX_CC2500_INO
# define FRSKY_RX_CC2500_INO
# endif
2016-10-16 19:51:42 +02:00
//Make sure telemetry is selected correctly
# ifndef TELEMETRY
# undef INVERT_TELEMETRY
2016-12-06 22:30:48 +01:00
# undef AFHDS2A_FW_TELEMETRY
# undef AFHDS2A_HUB_TELEMETRY
2018-08-03 18:29:24 +02:00
# undef HITEC_FW_TELEMETRY
# undef HITEC_HUB_TELEMETRY
2016-12-06 22:30:48 +01:00
# undef BAYANG_HUB_TELEMETRY
2017-11-23 18:44:31 +01:00
# undef CABELL_HUB_TELEMETRY
2016-12-06 22:30:48 +01:00
# undef HUBSAN_HUB_TELEMETRY
2018-08-28 16:13:28 +02:00
# undef BUGS_HUB_TELEMETRY
2018-11-03 17:24:47 +01:00
# undef NCC1701_HUB_TELEMETRY
2016-10-16 19:51:42 +02:00
# undef HUB_TELEMETRY
2016-12-19 17:33:30 +01:00
# undef SPORT_TELEMETRY
2019-09-30 20:53:10 +02:00
# undef SPORT_SEND
2016-12-19 17:33:30 +01:00
# undef DSM_TELEMETRY
# undef MULTI_TELEMETRY
2019-09-10 23:37:54 +02:00
# undef SCANNER_TELEMETRY
2019-09-17 09:53:18 +02:00
# undef SCANNER_CC2500_INO
2019-10-12 19:50:11 +02:00
# undef FRSKY_RX_TELEMETRY
# undef FRSKY_RX_CC2500_INO
2019-10-01 20:44:26 +02:00
# undef AFHDS2A_RX_TELEMETRY
# undef AFHDS2A_RX_A7105_INO
2019-11-05 00:31:20 +01:00
# undef HOTT_FW_TELEMETRY
2019-11-28 20:02:59 +01:00
# undef BAYANG_RX_TELEMETRY
# undef BAYANG_RX_NRF24L01_INO
2020-05-09 16:11:10 +02:00
# undef DEVO_HUB_TELEMETRY
2020-06-09 20:08:00 +02:00
# undef PROPEL_HUB_TELEMETRY
2020-09-18 16:13:45 +02:00
# undef OMP_HUB_TELEMETRY
2020-07-22 15:37:47 +02:00
# undef RLINK_HUB_TELEMETRY
2020-05-17 15:45:23 +02:00
# undef DSM_RX_CYRF6936_INO
2020-11-30 07:38:21 +00:00
# undef DSM_FWD_PGM
2020-12-13 23:15:43 +01:00
# undef WFLY2_HUB_TELEMETRY
2021-01-09 18:39:31 +01:00
# undef LOLI_HUB_TELEMETRY
2021-03-27 11:51:53 +01:00
# undef MT99XX_HUB_TELEMETRY
2021-02-10 12:31:37 +01:00
# undef MLINK_HUB_TELEMETRY
# undef MLINK_FW_TELEMETRY
2021-07-05 17:08:57 +02:00
# undef MULTI_CONFIG_INO
2016-10-16 19:51:42 +02:00
# else
2019-09-17 09:53:18 +02:00
# if not defined(SCANNER_CC2500_INO) || not defined(SCANNER_TELEMETRY)
2019-09-11 12:23:36 +02:00
# undef SCANNER_TELEMETRY
2019-09-17 09:53:18 +02:00
# undef SCANNER_CC2500_INO
2019-09-11 12:23:36 +02:00
# endif
2019-10-12 19:50:11 +02:00
# if not defined(FRSKY_RX_CC2500_INO) || not defined(FRSKY_RX_TELEMETRY)
# undef FRSKY_RX_TELEMETRY
# undef FRSKY_RX_CC2500_INO
2019-09-17 23:35:19 +02:00
# endif
2019-10-01 20:44:26 +02:00
# if not defined(AFHDS2A_RX_A7105_INO) || not defined(AFHDS2A_RX_TELEMETRY)
# undef AFHDS2A_RX_TELEMETRY
# undef AFHDS2A_RX_A7105_INO
# endif
2019-11-28 20:02:59 +01:00
# if not defined(BAYANG_RX_NRF24L01_INO) || not defined(BAYANG_RX_TELEMETRY)
# undef BAYANG_RX_TELEMETRY
# undef BAYANG_RX_NRF24L01_INO
# endif
2016-12-06 22:30:48 +01:00
# if not defined(BAYANG_NRF24L01_INO)
# undef BAYANG_HUB_TELEMETRY
2016-10-16 19:51:42 +02:00
# endif
2020-05-09 16:11:10 +02:00
# if not defined(DEVO_CYRF6936_INO)
# undef DEVO_HUB_TELEMETRY
# endif
2021-03-17 17:05:42 +01:00
# if not defined(OMP_CCNRF_INO)
2020-09-18 16:13:45 +02:00
# undef OMP_HUB_TELEMETRY
# endif
2020-06-09 20:08:00 +02:00
# if not defined(PROPEL_NRF24L01_INO)
# undef PROPEL_HUB_TELEMETRY
# endif
2018-11-03 17:24:47 +01:00
# if not defined(NCC1701_NRF24L01_INO)
# undef NCC1701_HUB_TELEMETRY
# endif
2019-09-17 23:35:19 +02:00
# if not defined(BUGS_A7105_INO) && not defined(BUGSMINI_NRF24L01_INO)
2018-10-17 13:23:27 +02:00
# undef BUGS_HUB_TELEMETRY
# endif
2017-11-23 18:44:31 +01:00
# if not defined(CABELL_NRF24L01_INO)
# undef CABELL_HUB_TELEMETRY
# endif
2020-07-22 15:37:47 +02:00
# if not defined(RLINK_CC2500_INO)
# undef RLINK_HUB_TELEMETRY
# endif
2016-12-06 22:30:48 +01:00
# if not defined(HUBSAN_A7105_INO)
# undef HUBSAN_HUB_TELEMETRY
# endif
# if not defined(AFHDS2A_A7105_INO)
# undef AFHDS2A_HUB_TELEMETRY
# undef AFHDS2A_FW_TELEMETRY
# endif
2018-08-03 18:29:24 +02:00
# if not defined(HITEC_CC2500_INO)
# undef HITEC_HUB_TELEMETRY
# undef HITEC_FW_TELEMETRY
# endif
2020-07-03 19:51:11 +02:00
# if not defined(FRSKYX_CC2500_INO) && not defined(FRSKYR9_SX1276_INO)
2016-10-16 19:51:42 +02:00
# undef SPORT_TELEMETRY
2019-09-30 20:53:10 +02:00
# undef SPORT_SEND
2018-08-03 18:29:24 +02:00
# endif
2019-09-30 20:53:10 +02:00
# if not defined (SPORT_TELEMETRY)
# undef SPORT_SEND
2016-10-16 19:51:42 +02:00
# endif
2016-12-06 22:30:48 +01:00
# if not defined(DSM_CYRF6936_INO)
# undef DSM_TELEMETRY
2021-02-21 16:05:25 +01:00
# undef DSM_FWD_PGM
2016-11-06 16:36:44 +01:00
# endif
2021-02-05 12:28:35 +01:00
# if not defined(MLINK_CYRF6936_INO)
# undef MLINK_HUB_TELEMETRY
2021-02-10 12:31:37 +01:00
# undef MLINK_FW_TELEMETRY
2021-02-05 12:28:35 +01:00
# endif
2019-11-05 00:31:20 +01:00
# if not defined(HOTT_CC2500_INO)
# undef HOTT_FW_TELEMETRY
# endif
2020-12-13 23:15:43 +01:00
# if not defined(WFLY2_A7105_INO)
# undef WFLY2_HUB_TELEMETRY
2020-12-11 10:40:00 +01:00
# endif
2021-01-09 18:39:31 +01:00
# if not defined(LOLI_NRF24L01_INO)
# undef LOLI_HUB_TELEMETRY
# endif
2021-03-27 11:51:53 +01:00
# if not defined(MT99XX_CCNRF_INO)
# undef MT99XX_HUB_TELEMETRY
# endif
2021-02-09 18:23:33 +01:00
# if not defined(FRSKYD_CC2500_INO) && not defined(MLINK_HUB_TELEMETRY) && not defined(BAYANG_HUB_TELEMETRY)
//protocols using FRSKYD user frames
# undef HUB_TELEMETRY
# endif
2021-07-05 17:08:57 +02:00
# if not defined(HOTT_FW_TELEMETRY) && not defined(DSM_TELEMETRY) && not defined(SPORT_TELEMETRY) && not defined(HUB_TELEMETRY) && not defined(HUBSAN_HUB_TELEMETRY) && not defined(BUGS_HUB_TELEMETRY) && not defined(NCC1701_HUB_TELEMETRY) && not defined(BAYANG_HUB_TELEMETRY) && not defined(CABELL_HUB_TELEMETRY) && not defined(RLINK_HUB_TELEMETRY) && not defined(AFHDS2A_HUB_TELEMETRY) && not defined(AFHDS2A_FW_TELEMETRY) && not defined(MULTI_TELEMETRY) && not defined(MULTI_STATUS) && not defined(HITEC_HUB_TELEMETRY) && not defined(HITEC_FW_TELEMETRY) && not defined(SCANNER_TELEMETRY) && not defined(FRSKY_RX_TELEMETRY) && not defined(AFHDS2A_RX_TELEMETRY) && not defined(BAYANG_RX_TELEMETRY) && not defined(DEVO_HUB_TELEMETRY) && not defined(PROPEL_HUB_TELEMETRY) && not defined(OMP_HUB_TELEMETRY) && not defined(WFLY2_HUB_TELEMETRY) && not defined(LOLI_HUB_TELEMETRY) && not defined(MLINK_HUB_TELEMETRY) && not defined(MLINK_FW_TELEMETRY) && not defined(MT99XX_HUB_TELEMETRY) && not defined(MULTI_CONFIG_INO)
2016-10-16 19:51:42 +02:00
# undef TELEMETRY
# undef INVERT_TELEMETRY
2019-11-11 19:15:39 +01:00
# undef MULTI_TELEMETRY
2016-10-16 19:51:42 +02:00
# endif
# endif
2021-02-10 12:31:37 +01:00
# if defined(MLINK_HUB_TELEMETRY) && defined(MLINK_FW_TELEMETRY)
# error "You must select MLINK_HUB_TELEMETRY or MLINK_FW_TELEMETRY, not both."
# endif
2019-10-10 23:12:09 +02:00
# ifdef SPORT_TELEMETRY
# define SPORT_SEND
# endif
2019-11-11 19:15:39 +01:00
# if not defined(STM32_BOARD)
# undef MULTI_SYNC
# endif
2019-10-15 02:04:19 +02:00
# if not defined(MULTI_TELEMETRY)
2019-11-11 19:15:39 +01:00
# undef MULTI_SYNC
2019-11-29 18:50:57 +01:00
# endif
2016-10-16 19:51:42 +02:00
//Make sure TX is defined correctly
# ifndef AILERON
# error You must select a correct channel order.
# endif
2018-01-09 09:04:55 +01:00
# if not defined(PPM_MAX_100) || not defined(PPM_MIN_100)
# error You must set correct PPM end points for your TX.
2016-10-16 19:51:42 +02:00
# endif
2017-01-02 17:26:35 +01:00
# if defined(ENABLE_BIND_CH)
# if BIND_CH<4
# error BIND_CH must be above 4.
# endif
# if BIND_CH>16
# error BIND_CH must be below or equal to 16.
# endif
# endif
2017-02-28 10:36:35 +01:00
2018-11-20 16:54:55 +01:00
# if defined(DSM_THROTTLE_KILL_CH)
# if DSM_THROTTLE_KILL_CH<4
# error DSM_THROTTLE_KILL_CH must be above 4.
# endif
# if DSM_THROTTLE_KILL_CH>16
# error DSM_THROTTLE_KILL_CH must be below or equal to 16.
# endif
# endif
2018-11-20 21:04:29 +01:00
# if defined(AFHDS2A_LQI_CH)
# if AFHDS2A_LQI_CH<4
# error AFHDS2A_LQI_CH must be above 4.
# endif
# if AFHDS2A_LQI_CH>14
# error AFHDS2A_LQI_CH must be below or equal to 14.
# endif
# endif
2017-02-28 10:36:35 +01:00
# if MIN_PPM_CHANNELS>16
# error MIN_PPM_CHANNELS must be below or equal to 16. The default for this value is 4.
# endif
# if MIN_PPM_CHANNELS<2
# error MIN_PPM_CHANNELS must be larger than 1. The default for this value is 4.
# endif
# if MAX_PPM_CHANNELS<MIN_PPM_CHANNELS
# error MAX_PPM_CHANNELS must be higher than MIN_PPM_CHANNELS. The default for this value is 16.
# endif
# if MAX_PPM_CHANNELS>16
# error MAX_PPM_CHANNELS must be below or equal to 16. The default for this value is 16.
2017-12-07 14:40:59 +00:00
# endif
2019-05-08 22:01:24 +02:00
2021-03-03 10:07:19 +01:00
# if defined (STM32_BOARD) && defined (DEBUG_SERIAL)
# undef SEND_CPPM
# ifdef NRF24L01_INSTALLED
# define XN297DUMP_NRF24L01_INO
# endif
# endif
# if not defined (STM32_BOARD) || not defined (TELEMETRY) || (not defined (FRSKY_RX_TELEMETRY) && not defined (AFHDS2A_RX_TELEMETRY) && not defined (BAYANG_RX_TELEMETRY) && not defined (DSM_RX_CYRF6936_INO))
# undef SEND_CPPM
2019-05-08 22:01:24 +02:00
# endif
2019-12-30 15:44:16 -06:00
//Check if Direct inputs defined correctly
# if defined (ENABLE_DIRECT_INPUTS)
# if not defined (STM32_BOARD) || not defined (ENABLE_PPM) || defined (ENABLE_SERIAL)
# error You can enable dirct inputs only in PPM mode and only for STM32 board.
# endif
# if not defined (DI1_PIN) && not defined (DI2_PIN) && not defined (DI3_PIN) && not defined (DI4_PIN)
# error You must define at least 1 direct input pin or undefine ENABLE_DIRECT_INPUTS in config.
# endif
# if not defined (DI_CH1_read) && not defined (DI_CH2_read) && not defined (DI_CH3_read) && not defined (DI_CH4_read)
# error You must define at least 1 direct input chanell read macros or undefine ENABLE_DIRECT_INPUTS in config.
# endif
2020-01-12 14:06:27 +01:00
# endif