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
# if not defined(ARDUINO_AVR_PRO) && not defined(ARDUINO_AVR_MINI) && not defined(ARDUINO_AVR_NANO)
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
# if F_CPU != 16000000L || not defined(__AVR_ATmega328P__)
# error You must select the processor type "ATmega328(5V, 16MHz)"
# endif
# endif
# if defined (STM32_BOARD) && not defined (ORANGE_TX)
//STM32
# ifndef ARDUINO_GENERIC_STM32F103C
# error You must select the board type "Generic STM32F103C series"
# endif
# endif
//Change/Force configuration if OrangeTX
# ifdef ORANGE_TX
# undef ENABLE_PPM // Disable PPM for OrangeTX module
# undef A7105_INSTALLED // Disable A7105 for OrangeTX module
# undef CC2500_INSTALLED // Disable CC2500 for OrangeTX module
# undef NRF24L01_INSTALLED // Disable NRF for OrangeTX module
# define TELEMETRY // Enable telemetry
# define INVERT_TELEMETRY // Enable invert telemetry
# define DSM_TELEMETRY // Enable DSM telemetry
# endif
//Make sure protocols are selected correctly
# ifndef A7105_INSTALLED
# undef FLYSKY_A7105_INO
# undef HUBSAN_A7105_INO
2016-10-20 21:55:02 +02:00
# undef AFHDS2A_A7105_INO
2016-10-16 19:51:42 +02:00
# endif
# ifndef CYRF6936_INSTALLED
# undef DEVO_CYRF6936_INO
# undef DSM_CYRF6936_INO
# undef J6PRO_CYRF6936_INO
# endif
# ifndef CC2500_INSTALLED
# undef FRSKYD_CC2500_INO
# undef FRSKYV_CC2500_INO
# undef FRSKYX_CC2500_INO
# undef SFHSS_CC2500_INO
# endif
# ifndef NRF24L01_INSTALLED
# undef BAYANG_NRF24L01_INO
# undef CG023_NRF24L01_INO
# undef CX10_NRF24L01_INO
# undef ESKY_NRF24L01_INO
# undef HISKY_NRF24L01_INO
# undef KN_NRF24L01_INO
# undef SLT_NRF24L01_INO
# undef SYMAX_NRF24L01_INO
# undef V2X2_NRF24L01_INO
# undef YD717_NRF24L01_INO
# undef MT99XX_NRF24L01_INO
# undef MJXQ_NRF24L01_INO
# undef SHENQI_NRF24L01_INO
# undef FY326_NRF24L01_INO
# undef FQ777_NRF24L01_INO
# undef ASSAN_NRF24L01_INO
# undef HONTAI_NRF24L01_INO
# endif
//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
# undef BAYANG_HUB_TELEMETRY
# undef HUBSAN_HUB_TELEMETRY
2016-10-16 19:51:42 +02:00
# undef HUB_TELEMETRY
2016-12-19 17:33:30 +01:00
# undef SPORT_TELEMETRY
# undef DSM_TELEMETRY
# undef MULTI_TELEMETRY
2016-10-16 19:51:42 +02:00
# else
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
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
# if not defined(FRSKYD_CC2500_INO)
2016-10-16 19:51:42 +02:00
# undef HUB_TELEMETRY
# endif
2016-10-22 12:06:44 +02:00
# if not defined(FRSKYX_CC2500_INO)
2016-10-16 19:51:42 +02:00
# undef SPORT_TELEMETRY
# endif
2016-12-06 22:30:48 +01:00
# if not defined(DSM_CYRF6936_INO)
# undef DSM_TELEMETRY
2016-11-06 16:36:44 +01:00
# endif
2016-12-06 22:30:48 +01:00
# if not defined(DSM_TELEMETRY) && not defined(SPORT_TELEMETRY) && not defined(HUB_TELEMETRY) && not defined(HUBSAN_HUB_TELEMETRY) && not defined(BAYANG_HUB_TELEMETRY) && not defined(AFHDS2A_HUB_TELEMETRY) && not defined(AFHDS2A_FW_TELEMETRY)
2016-10-16 19:51:42 +02:00
# undef TELEMETRY
# undef INVERT_TELEMETRY
# endif
# endif
//Make sure TX is defined correctly
# ifndef AILERON
# error You must select a correct channel order.
# endif
# if not defined(PPM_MAX_100) || not defined(PPM_MIN_100) || not defined(PPM_MAX_125) || not defined(PPM_MIN_125)
# error You must set correct TX end points.
# endif