From bf09855014a07561b682641c091a2536edfa4c50 Mon Sep 17 00:00:00 2001 From: Pascal Langer Date: Tue, 7 Sep 2021 16:59:06 +0200 Subject: [PATCH] Another attempt --- Multiprotocol/Multiprotocol.ino | 7 ++++--- Multiprotocol/_Config.h | 4 ++-- buildroot/bin/build_release_stm32f1_no_debug | 6 +++--- buildroot/bin/build_release_stm32f1_t18int | 3 --- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Multiprotocol/Multiprotocol.ino b/Multiprotocol/Multiprotocol.ino index d38e03072..2c67a180e 100644 --- a/Multiprotocol/Multiprotocol.ino +++ b/Multiprotocol/Multiprotocol.ino @@ -1134,7 +1134,6 @@ static void protocol_init() if(IS_WAIT_BIND_off) { remote_callback = 0; // No protocol - modules_reset(); // Reset all modules LED_off; // Led off during protocol init crc16_polynomial = 0x1021; // Default CRC crc16_polynomial crc8_polynomial = 0x31; // Default CRC crc8_polynomial @@ -1196,6 +1195,9 @@ static void protocol_init() debugln("Protocol selected: %d, sub proto %d, rxnum %d, option %d", protocol, sub_protocol, RX_num, option); if(protocol) { + //Reset all modules + modules_reset(); + uint8_t index=0; #if defined(FRSKYX_CC2500_INO) && defined(EU_MODULE) if( ! ( (protocol == PROTO_FRSKYX || protocol == PROTO_FRSKYX2) && sub_protocol < 2 ) ) @@ -1249,8 +1251,7 @@ static void protocol_init() } #endif } - - + #if defined(WAIT_FOR_BIND) && defined(ENABLE_BIND_CH) if( IS_AUTOBIND_FLAG_on && IS_BIND_CH_PREV_off && (cur_protocol[1]&0x80)==0 && mode_select == MODE_SERIAL) { // Autobind is active but no bind requested by either BIND_CH or BIND. But do not wait if in PPM mode... diff --git a/Multiprotocol/_Config.h b/Multiprotocol/_Config.h index 8bb25f9eb..417d5732c 100644 --- a/Multiprotocol/_Config.h +++ b/Multiprotocol/_Config.h @@ -220,7 +220,7 @@ #define BAYANG_RX_NRF24L01_INO #define BUGSMINI_NRF24L01_INO #define CABELL_NRF24L01_INO -#define CFLIE_NRF24L01_INO +//#define CFLIE_NRF24L01_INO #define CG023_NRF24L01_INO #define CX10_NRF24L01_INO //Include Q2X2 protocol #define DM002_NRF24L01_INO @@ -238,7 +238,7 @@ #define JJRC345_NRF24L01_INO #define KN_NRF24L01_INO #define LOLI_NRF24L01_INO -#define MOULDKG_NRF24L01_INO +//#define MOULDKG_NRF24L01_INO #define NCC1701_NRF24L01_INO #define POTENSIC_NRF24L01_INO #define PROPEL_NRF24L01_INO diff --git a/buildroot/bin/build_release_stm32f1_no_debug b/buildroot/bin/build_release_stm32f1_no_debug index 89b396fc0..42783b90d 100644 --- a/buildroot/bin/build_release_stm32f1_no_debug +++ b/buildroot/bin/build_release_stm32f1_no_debug @@ -5,7 +5,7 @@ exitcode=0; # Builds for the DIY 5-in-1 module exceed the 120KB working capacity of the STM32F103CB # To work around this we have to disable some protocols in the builds for this module -DIY_5IN1_DISABLED="MOULDKG_NRF24L01_INO IKEAANSLUTA_CC2500_INO"; +#DIY_5IN1_DISABLED="MOULDKG_NRF24L01_INO"; # Generic 4-in-1 builds printf "\e[33;1mBuilding mm-stm-serial-aetr-v$MULTI_VERSION.bin\e[0m\n"; @@ -29,7 +29,7 @@ mv build/Multiprotocol.ino.bin ./binaries/mm-stm-serial-reta-v$MULTI_VERSION.bin # DIY 5-in-1 builds printf "\e[33;1mBuilding mm-stm-5in1-aetr-v$MULTI_VERSION.bin\e[0m\n"; opt_replace RETA AETR; -opt_disable $DIY_5IN1_DISABLED; +#opt_disable $DIY_5IN1_DISABLED; opt_enable SX1276_INSTALLED; buildMulti; exitcode=$((exitcode+$?)); @@ -52,7 +52,7 @@ printf "\e[33;1mBuilding mm-tlite5in1-aetr-v$MULTI_VERSION.bin\e[0m\n"; opt_replace RETA AETR; opt_disable INVERT_TELEMETRY; opt_disable SX1276_INSTALLED; -opt_enable $DIY_5IN1_DISABLED; +#opt_enable $DIY_5IN1_DISABLED; opt_enable "MULTI_5IN1_INTERNAL JP_TLite" buildMulti; exitcode=$((exitcode+$?)); diff --git a/buildroot/bin/build_release_stm32f1_t18int b/buildroot/bin/build_release_stm32f1_t18int index 7ffc14c32..196f5f881 100644 --- a/buildroot/bin/build_release_stm32f1_t18int +++ b/buildroot/bin/build_release_stm32f1_t18int @@ -3,12 +3,9 @@ source ./buildroot/bin/buildFunctions; exitcode=0; -T18_DISABLED="MOULDKG_NRF24L01_INO IKEAANSLUTA_CC2500_INO"; - printf "\e[33;1mBuilding mm-t18int-aetr-v$MULTI_VERSION.bin\e[0m\n"; opt_disable ENABLE_PPM; opt_disable INVERT_TELEMETRY; -opt_disable $T18_DISABLED; buildMulti; exitcode=$((exitcode+$?)); mv build/Multiprotocol.ino.bin ./binaries/mm-t18int-aetr-v$MULTI_VERSION.bin;