diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2b3577d..a9d6280 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,16 +39,26 @@ jobs: strategy: fail-fast: false matrix: - board: [ - "multi4in1:avr:multiatmega328p:bootloader=none", - "multi4in1:avr:multiatmega328p:bootloader=optiboot", - "multi4in1:avr:multixmega32d4", - "multi4in1:STM32F1:multi5in1t18int", - "multi4in1:STM32F1:multistm32f103cb:debug_option=none", - "multi4in1:STM32F1:multistm32f103cb:debug_option=native", - "multi4in1:STM32F1:multistm32f103cb:debug_option=ftdi", - "multi4in1:STM32F1:multistm32f103c8:debug_option=none" - ] + include: + - board: "multi4in1:avr:multiatmega328p:bootloader=none" + name: "ATmega328p" + - board: "multi4in1:avr:multiatmega328p:bootloader=optiboot" + name: "ATmega328p (Optiboot)" + - board: "multi4in1:avr:multixmega32d4" + name: "OrangeRX" + - board: "multi4in1:STM32F1:multistm32f103c8:debug_option=none" + name: "STM32F103 (64KB)" + - board: "multi4in1:STM32F1:multistm32f103cb:debug_option=none" + name: "STM32F103 (128KB)" + - board: "multi4in1:STM32F1:multistm32f103cb:debug_option=native" + name: "STM32F103 (128KB, USB Debugging)" + - board: "multi4in1:STM32F1:multistm32f103cb:debug_option=ftdi" + name: "STM32F103 (128KB, Serial Debugging)" + - board: "multi4in1:STM32F1:multi5in1t18int" + name: "T18 5-in-1 (128KB)" + + # Set the build name using the friendly board name + name: ${{ matrix.name }} # Set the environment variables env: diff --git a/Lua_scripts/MultiChan.txt b/Lua_scripts/MultiChan.txt index 71550ca..c1e78ba 100644 --- a/Lua_scripts/MultiChan.txt +++ b/Lua_scripts/MultiChan.txt @@ -198,7 +198,7 @@ 81,0,E010r5,E010r5,1,Flip,LED,CALIB,HLess,RTH,GLIDE 82,0,LOLI,Std,0,CH5,CH6,CH7,CH8,1SwSePpPw,2SwSePw,3SwSe,4SwSe,5SwSeSb,6SwSe,7SwSePw,8SwSe 83,0,E129,E129,1,TakLan,EmStop,TrimA,TrimE,TrimR -83,1,E129,C186,1,TakLan,EmStop,TrimA,TrimE,TrimR,Loop +83,1,E129,C186,1,TakLan,EmStop,TrimA,TrimE,TrimR,Loop,Flip 84,0,JOYSWAY,Std,0 85,0,E016H,Std,1,Stop,Flip,n-a,HLess,RTH 87,0,IKEA diff --git a/Lua_scripts/README.md b/Lua_scripts/README.md index 2ad4ee7..1bc6204 100644 --- a/Lua_scripts/README.md +++ b/Lua_scripts/README.md @@ -58,15 +58,11 @@ This is the Graupner HoTT adapted version of the Model Locator script using RSSI The OpenTX sensor "RSSI" is populated by the individual OpenTX telemetry protocol implementations and returns a value from 0..100 (percent) originating from the early FrSky implementation. It turns out that FrSky did not really provide a genuine signal strength indicator in units of dbm but a link quality indicator in 0..100%. With Graupner HoTT the link quality indicator is not a good basis for the model locator as it is very non-linear and doesn't change much with distance. Using the Graupner HoTT telemetry sensor "Rssi" which is a true signal strength indicator serves the purpose of locating a model much better as it varies much more with distance. -## DSM Forward Programming +## DSM Tools for EdgeTX and OpenTx -This is a work in progress. It's available for color(+touch) and B&W screens. +Collection of EdgeTx/OpenTX Tools to use with Spektrum Receivers including forward programming. Located on the radio SD card under \SCRIPTS\TOOLS, make sure to copy the DSMLIB folder! -Work on OpenTX and EdgeTX. Located on the radio SD card under \SCRIPTS\TOOLS, make sure to copy the DSMLIB folder along with DSM FwdPrg_05_Color.lua or DSM FwdPrg_05_BW.lua. - -[![DSM Forward Programming](https://img.youtube.com/vi/sjIaDw5j9nE/0.jpg)](https://www.youtube.com/watch?v=sjIaDw5j9nE) - -If some text appears as Unknown_xxx, please report xxx and what the exact text display should be. +Frank is maintaining these awesome tools, check out his [repository](https://github.com/frankiearzu/DSMTools). Feel free to ask questions or open issues there. ## DSM PID Flight log gain parameters for Blade micros diff --git a/Multiprotocol/Bluefly_ccnrf.ino b/Multiprotocol/Bluefly_ccnrf.ino new file mode 100644 index 0000000..19d64b1 --- /dev/null +++ b/Multiprotocol/Bluefly_ccnrf.ino @@ -0,0 +1,118 @@ +/* + This project is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Multiprotocol is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Multiprotocol. If not, see . + */ +// compatible with BLUEFLY HP100 + +#if defined(BLUEFLY_CCNRF_INO) + +#include "iface_nrf250k.h" + +#define BLUEFLY_PACKET_PERIOD 6000 +#define BLUEFLY_PACKET_SIZE 12 +#define BLUEFLY_RF_BIND_CHANNEL 81 +#define BLUEFLY_NUM_RF_CHANNELS 15 +#define BLUEFLY_BIND_COUNT 800 +#define BLUEFLY_TXID_SIZE 5 + +static void __attribute__((unused)) BLUEFLY_send_packet() +{ + if(IS_BIND_IN_PROGRESS) + { + memset(packet, 0x55, BLUEFLY_PACKET_SIZE); + memcpy(packet, rx_tx_addr, BLUEFLY_TXID_SIZE); + packet[5] = hopping_frequency[0]; + } + else + { + NRF250K_Hopping(hopping_frequency_no); + hopping_frequency_no++; + if(hopping_frequency_no >= BLUEFLY_NUM_RF_CHANNELS); + hopping_frequency_no = 0; + + packet[8] = packet[9] = 0; + for(uint8_t i=0; i<8 ; i++) + { + uint16_t ch = convert_channel_16b_limit(CH_AETR[i], 0, 1000); + packet[ i] = ch; + ch &= 0x300; + ch >>= 2; + packet[8 + (i>3?0:1)] = (packet[8 + (i>3?0:1)] >> 2) | ch; + } + // Checksum + uint8_t l, h, t; + l = h = 0xff; + for (uint8_t i=0; i<10; ++i) + { + h ^= packet[i]; + h ^= h >> 4; + t = h; + h = l; + l = t; + t = (l<<4) | (l>>4); + h ^= ((t<<2) | (t>>6)) & 0x1f; + h ^= t & 0xf0; + l ^= ((t<<1) | (t>>7)) & 0xe0; + } + packet[10] = h; + packet[11] = l; + } + + NRF250K_WritePayload(packet, BLUEFLY_PACKET_SIZE); + NRF250K_SetPower(); // Set tx_power + NRF250K_SetFreqOffset(); // Set frequency offset +} + +static void __attribute__((unused)) BLUEFLY_RF_init() +{ + NRF250K_Init(); + NRF250K_SetTXAddr((uint8_t *)"\x32\xAA\x45\x45\x78", BLUEFLY_TXID_SIZE); // BLUEFLY Bind address + NRF250K_HoppingCalib(BLUEFLY_NUM_RF_CHANNELS); // Calibrate all channels + NRF250K_RFChannel(BLUEFLY_RF_BIND_CHANNEL); // Set bind channel +} + +static void __attribute__((unused)) BLUEFLY_initialize_txid() +{ + uint8_t start = (rx_tx_addr[3] % 47) + 2; + for(uint8_t i=0;i0x00->0x20->..., long press=0x10->0x30->0x10->... => C186 throttle trim is doing the same:up=short press and down=long press - packet[ 3] = GET_FLAG(CH10_SW, 0x40); // C159 loop flight 0x40, flag 0x04 is also set on this heli + packet[ 3] = GET_FLAG(CH10_SW, 0x40) // C159 loop flight 0x40, flag 0x04 is also set on this heli + | GET_FLAG(CH11_SW, 0x08); // C129V2 flip + // Other flags in packet[3] => E129 Mode: short press=0x20->0x00->0x20->..., long press=0x10->0x30->0x10->... => C186 throttle trim is doing the same:up=short press and down=long press packet[ 4] = GET_FLAG(CH5_SW, 0x20) // Take off/Land 0x20 | GET_FLAG(CH6_SW, 0x04); // Emergency stop 0x04 //Channels and trims diff --git a/Multiprotocol/J6Pro_cyrf6936.ino b/Multiprotocol/J6Pro_cyrf6936.ino index 195e266..fd58051 100644 --- a/Multiprotocol/J6Pro_cyrf6936.ino +++ b/Multiprotocol/J6Pro_cyrf6936.ino @@ -36,7 +36,7 @@ enum PktState { }; const uint8_t PROGMEM j6pro_bind_sop_code[] = {0x62, 0xdf, 0xc1, 0x49, 0xdf, 0xb1, 0xc0, 0x49}; -//const uint8_t j6pro_data_code[] = {0x02, 0xf9, 0x93, 0x97, 0x02, 0xfa, 0x5c, 0xe3, 0x01, 0x2b, 0xf1, 0xdb, 0x01, 0x32, 0xbe, 0x6f}; // unneeded since this is the default table after a reset +const uint8_t j6pro_data_code[] = {0x02, 0xf9, 0x93, 0x97, 0x02, 0xfa, 0x5c, 0xe3, 0x01, 0x2b, 0xf1, 0xdb, 0x01, 0x32, 0xbe, 0x6f}; // unneeded since this is the default table after a reset static void __attribute__((unused)) j6pro_build_bind_packet() { @@ -84,7 +84,9 @@ static void __attribute__((unused)) j6pro_cyrf_init() CYRF_WriteRegister(CYRF_10_FRAMING_CFG, 0xee); CYRF_WriteRegister(CYRF_1F_TX_OVERRIDE, 0x00); CYRF_WriteRegister(CYRF_1E_RX_OVERRIDE, 0x00); - //CYRF_ConfigDataCode(j6pro_data_code, 16); + + //Same as default reset but issues if not configured... + CYRF_ConfigDataCode(j6pro_data_code, 16); CYRF_WritePreamble(0x333302); CYRF_GetMfgData(cyrfmfg_id); diff --git a/Multiprotocol/Losi_cyrf6936.ino b/Multiprotocol/Losi_cyrf6936.ino index 114b09f..a7414fa 100644 --- a/Multiprotocol/Losi_cyrf6936.ino +++ b/Multiprotocol/Losi_cyrf6936.ino @@ -19,7 +19,7 @@ #define LOSI_FORCE_ID -const uint8_t PROGMEM LOSI_bind_sop_code[] = {0x62, 0xdf, 0xc1, 0x49, 0xdf, 0xb1, 0xc0, 0x49}; +//const uint8_t PROGMEM LOSI_bind_sop_code[] = {0x62, 0xdf, 0xc1, 0x49, 0xdf, 0xb1, 0xc0, 0x49}; const uint8_t LOSI_data_code[][16] = { { 0xD7, 0xA1, 0x54, 0xB1, 0x5E, 0x89, 0xAE, 0x86, 0xC9, 0x2C, 0x06, 0x93, 0x86, 0xB9, 0x9E, 0xD7 }, //bind /* { 0xE1, 0xD6, 0x31, 0x26, 0x5F, 0xBD, 0x40, 0x93, 0xDC, 0x68, 0x08, 0x99, 0x97, 0xAE, 0xAF, 0x8C }, @@ -94,17 +94,17 @@ static void __attribute__((unused)) LOSI_cyrf_init() CYRF_WritePreamble(0x333304); //CYRF_WriteRegister(CYRF_27_CLK_OVERRIDE, 0x00); CYRF_WriteRegister(CYRF_10_FRAMING_CFG, 0x4A); - CYRF_WriteRegister(CYRF_1F_TX_OVERRIDE, 0x04); // No CRC + CYRF_WriteRegister(CYRF_1F_TX_OVERRIDE, 0x04); // No CRC //CYRF_WriteRegister(CYRF_1E_RX_OVERRIDE, 0x14); //CYRF_WriteRegister(CYRF_14_EOP_CTRL, 0x02); + CYRF_ConfigDataCode(LOSI_data_code[0], 16); // Load bind data code } uint16_t LOSI_callback() { #ifdef MULTI_SYNC - telemetry_set_input_sync(19738); + telemetry_set_input_sync(packet_period); #endif - LOSI_send_packet(); if(bind_counter) { bind_counter--; @@ -112,17 +112,16 @@ uint16_t LOSI_callback() { BIND_DONE; CYRF_ConfigDataCode(LOSI_data_code[1], 16); // Load normal data code + packet_period = 19738; } - return 8763; } - return 19738; + LOSI_send_packet(); + return packet_period; } void LOSI_init() { LOSI_cyrf_init(); - //CYRF_FindBestChannels(hopping_frequency, 1, 0, 0x13, 75); // 75 is unknown since dump stops at 0x27, this routine resets the CRC Seed to 0 - //CYRF_ConfigRFChannel(hopping_frequency[0] | 1); // Only odd channels #ifdef LOSI_FORCE_ID rx_tx_addr[0] = 0x47; @@ -132,16 +131,11 @@ void LOSI_init() CYRF_ConfigRFChannel(0x27); #endif - if(IS_BIND_IN_PROGRESS) - { - bind_counter = 300; - CYRF_ConfigDataCode(LOSI_data_code[0], 16); // Load bind data code - } - else - { - CYRF_ConfigDataCode(LOSI_data_code[1], 16); // Load normal data code - bind_counter = 0; - } + CYRF_FindBestChannels(hopping_frequency, 1, 0, 0x13, 75); // 75 is unknown since dump stops at 0x27, this routine resets the CRC Seed to 0 + CYRF_ConfigRFChannel(hopping_frequency[0]); // Only odd channels integrated in CYRF code... + + bind_counter = IS_BIND_IN_PROGRESS?300:1; + packet_period = 8763; } #endif diff --git a/Multiprotocol/Multi.txt b/Multiprotocol/Multi.txt index 3e0a317..75d9067 100644 --- a/Multiprotocol/Multi.txt +++ b/Multiprotocol/Multi.txt @@ -91,3 +91,4 @@ 92,MT99xx,PA18 93,Kyosho2,KT-17 94,Scorpio +95,BlueFly diff --git a/Multiprotocol/Multi_Protos.ino b/Multiprotocol/Multi_Protos.ino index 0093d58..05ec796 100644 --- a/Multiprotocol/Multi_Protos.ino +++ b/Multiprotocol/Multi_Protos.ino @@ -106,6 +106,7 @@ const char STR_LOSI[] ="Losi"; const char STR_MOULDKG[] ="MouldKg"; const char STR_XERALL[] ="Xerall"; const char STR_SCORPIO[] ="Scorpio"; +const char STR_BLUEFLY[] ="BlueFly"; const char STR_SUBTYPE_FLYSKY[] = "\x04""Std\0""V9x9""V6x6""V912""CX20"; const char STR_SUBTYPE_HUBSAN[] = "\x04""H107""H301""H501"; @@ -222,6 +223,9 @@ const mm_protocol_definition multi_protocols[] = { #if defined(BAYANG_RX_NRF24L01_INO) {PROTO_BAYANG_RX, STR_BAYANG_RX, STR_CPPM, NBR_CPPM, OPTION_NONE, 0, 0, SW_NRF, BAYANG_RX_init, BAYANG_RX_callback }, #endif + #if defined(BLUEFLY_CCNRF_INO) + {PROTO_BLUEFLY, STR_BLUEFLY, NO_SUBTYPE, 0, OPTION_RFTUNE, 0, 0, SW_NRF, BLUEFLY_init, BLUEFLY_callback }, + #endif #if defined(BUGS_A7105_INO) {PROTO_BUGS, STR_BUGS, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_A7105, BUGS_init, BUGS_callback }, #endif diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index 281150b..c34b173 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -19,7 +19,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 3 #define VERSION_REVISION 3 -#define VERSION_PATCH_LEVEL 34 +#define VERSION_PATCH_LEVEL 38 #define MODE_SERIAL 0 @@ -122,6 +122,8 @@ enum PROTOCOLS PROTO_MT99XX2 = 92, // =>NRF24L01, extension of MT99XX protocol PROTO_KYOSHO2 = 93, // =>NRF24L01 PROTO_SCORPIO = 94, // =>CYRF6936 + PROTO_BLUEFLY = 95, // =>CC2500 & NRF24L01 + PROTO_NANORF = 126, // =>NRF24L01 PROTO_TEST = 127, // =>CC2500 diff --git a/Multiprotocol/Validate.h b/Multiprotocol/Validate.h index 3a20e35..8cc99e2 100644 --- a/Multiprotocol/Validate.h +++ b/Multiprotocol/Validate.h @@ -340,6 +340,7 @@ #undef ZSX_NRF24L01_INO #endif #if ( not defined(CC2500_INSTALLED) && not defined(NRF24L01_INSTALLED) ) || defined MULTI_EU + #undef BLUEFLY_CCNRF_INO #undef GD00X_CCNRF_INO #undef KF606_CCNRF_INO #undef MJXQ_CCNRF_INO diff --git a/Multiprotocol/_Config.h b/Multiprotocol/_Config.h index c18cbc4..bbf619f 100644 --- a/Multiprotocol/_Config.h +++ b/Multiprotocol/_Config.h @@ -255,6 +255,7 @@ #define ZSX_NRF24L01_INO //The protocols below need either a CC2500 or NRF24L01 to be installed +#define BLUEFLY_CCNRF_INO #define GD00X_CCNRF_INO #define KF606_CCNRF_INO #define MJXQ_CCNRF_INO @@ -567,6 +568,8 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= { QX100 PROTO_BAYANG_RX NONE + PROTO_BLUEFLY + NONE PROTO_BUGS NONE PROTO_BUGSMINI diff --git a/Protocols_Details.md b/Protocols_Details.md index a3eb6db..6b219a5 100644 --- a/Protocols_Details.md +++ b/Protocols_Details.md @@ -65,6 +65,7 @@ Protocol Name|Protocol Number|Sub_Proto 0|Sub_Proto 1|Sub_Proto 2|Sub_Proto 3|Su [Assan](Protocols_Details.md#ASSAN---24)|24|||||||||NRF24L01| [Bayang](Protocols_Details.md#BAYANG---14)|14|Bayang|H8S3D|X16_AH|IRDRONE|DHD_D4|QX100|||NRF24L01|XN297 [Bayang RX](Protocols_Details.md#BAYANG-RX---59)|59|Multi|CPPM|||||||NRF24L01|XN297 +[BlueFly](Protocols_Details.md#BLUEFLY---95)|95|||||||||NRF24L01| [Bugs](Protocols_Details.md#BUGS---41)|41|||||||||A7105| [BugsMini](Protocols_Details.md#BUGSMINI---42)|42|BUGSMINI|BUGS3H|||||||NRF24L01|XN297 [Cabell](Protocols_Details.md#Cabell---34)|34|Cabell_V3|C_TELEM|-|-|-|-|F_SAFE|UNBIND|NRF24L01| @@ -325,7 +326,9 @@ CH1|CH2|CH3|CH4 ## Kyosho - *73* ### Sub_protocol FHSS - *0* -Surface protocol called FHSS introduced in 2017. Transmitters: KT-531P, KT-431PT... +Surface protocol called FHSS introduced in 2017. Transmitter: KT-531P. Models: Mini-Z + +Extended limits supported CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14 ---|---|---|---|---|---|---|---|---|----|----|----|----|---- @@ -616,16 +619,18 @@ Calib is the same as the original radio with both sticks down and to the left in Models: Eachine E129/E130 and Twister Ninja 250 ### Sub_protocol C186 - *1* -Models: C186/E120, C127/E110, K127, C159, C189 +Models: C186/E120, C127/E110, K127, C159, C189, C129v2 The FC of the heli seems to store the trims Trim A/E/R=CH7..9. If you use these trims, make sure to center them after powering off the heli or they will be added to the previous trims and over correct. -CH10| ----| -Loop| +CH10|CH11 +---|--- +Loop|Flip Loop: circular flight on the C159 (others?) +Flip: flip/aerobatic on the C129v2 (others?) + ## J6Pro - *22* CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12 @@ -1030,6 +1035,17 @@ If a CC2500 is installed it will be used for all the below protocols. Option in If only a NRF24L01 is installed then these protocols might be problematic because they are using the XN297L emulation with a transmission speed of 250kbps which doesn't work very well with every NRF24L01, this is an hardware issue with the authenticity and accuracy of the components. +## BLUEFLY - *95* +Model: HP100 + +CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8 +---|---|---|---|---|---|---|--- +A|E|T|R|CH5|CH6|CH7|CH8 + +TRIM: either use this channel for trim only or add a mixer with aileron to increase the roll rate. + +RATE: -100% high rate, +100% low rate + ## GD00X - *47* Model: GD005 C-17 Transport, GD006 DA62 and ZC-Z50 @@ -1398,7 +1414,7 @@ If a CC2500 is installed it will be used for this sub protocol. Option in this c If only a NRF24L01 is installed then this sub protocol might be problematic because it is using the xn297L emulation with a transmission speed of 250kbps which doesn't work very well with every NRF24L01, this is an hardware issue with the authenticity and accuracy of the components. ### Sub_protocol X420 - *1* -Models: XK X420/X520 (TX=X4) +Models: XK X420/X520 (TX=X4), WLtoys 284131/284161/284010 *** # NRF24L01 RF Module @@ -1948,7 +1964,7 @@ CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11 A|E|T|R|FLIP|LIGHT|PICTURE|VIDEO|HEADLESS|MAG_CAL_X|MAG_CAL_Y ### Sub_protocol V2x2 - *0* -Models: WLToys V202/252/272, JXD 385/388, JJRC H6C, Yizhan Tarantula X6 ... +Models: WLToys V202/252/272/A959/K969/K979/K989/K999, JXD 385/388, JJRC H6C, Yizhan Tarantula X6 ... PICTURE: also automatic Missile Launcher and Hoist in one direction diff --git a/buildroot/bin/buildFunctions b/buildroot/bin/buildFunctions index 7199533..d1a78dd 100644 --- a/buildroot/bin/buildFunctions +++ b/buildroot/bin/buildFunctions @@ -86,6 +86,7 @@ buildEachRFModule() { buildReleaseFiles(){ if [[ "$BOARD" =~ ":avr:multixmega32d4" ]]; then build_release_orx; + build_release_extras; elif [[ "$BOARD" =~ ":avr:multiatmega328p:bootloader=none" ]]; then build_release_avr_noboot; elif [[ "$BOARD" =~ ":avr:multiatmega328p:bootloader=optiboot" ]]; then diff --git a/buildroot/bin/build_release_extras b/buildroot/bin/build_release_extras new file mode 100644 index 0000000..17a6923 --- /dev/null +++ b/buildroot/bin/build_release_extras @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +source ./buildroot/bin/buildFunctions; +exitcode=0; + +printf "\e[33;1mPackaging ancilliary files for v$MULTI_VERSION\e[0m\n"; +cp Multiprotocol/Multi.txt ./binaries/Multi.txt; + +mkdir -p SCRIPTS/TOOLS; +cp -r Lua_scripts/* SCRIPTS/TOOLS/; +find SCRIPTS/TOOLS -type f -name "*.md" -delete + +zip -q -r ./binaries/MultiLuaScripts.zip SCRIPTS/TOOLS/*; + +exit $exitcode; diff --git a/buildroot/bin/build_release_orx b/buildroot/bin/build_release_orx index f2d05c4..c72f6fa 100644 --- a/buildroot/bin/build_release_orx +++ b/buildroot/bin/build_release_orx @@ -16,11 +16,4 @@ buildMulti; exitcode=$((exitcode+$?)); mv build/Multiprotocol.ino.bin ./binaries/mm-orangerx-aetr-blue-inv-v$MULTI_VERSION.bin; -printf "\e[33;1mPackaging ancilliary files for v$MULTI_VERSION\e[0m\n"; -cp Multiprotocol/Multi.txt ./binaries/Multi.txt; -mkdir -p SCRIPTS/TOOLS; -cp Lua_scripts/*.lua SCRIPTS/TOOLS/; -cp Lua_scripts/*.txt SCRIPTS/TOOLS/; -zip -q ./binaries/MultiLuaScripts.zip SCRIPTS/TOOLS/*; - exit $exitcode; diff --git a/buildroot/bin/build_release_stm32f1_64k b/buildroot/bin/build_release_stm32f1_64k index a626582..5cc7f3f 100644 --- a/buildroot/bin/build_release_stm32f1_64k +++ b/buildroot/bin/build_release_stm32f1_64k @@ -3,7 +3,7 @@ source ./buildroot/bin/buildFunctions; exitcode=0; -# CC2500-only 64Kb builds +# CC2500-only 64Kb FCC builds printf "\e[33;1mBuilding mm-stm-cc2500-64-aetr-v$MULTI_VERSION.bin\e[0m\n"; opt_enable $ALL_PROTOCOLS; opt_disable IKEAANSLUTA_CC2500_INO; @@ -28,4 +28,24 @@ buildMulti; exitcode=$((exitcode+$?)); mv build/Multiprotocol.ino.bin ./binaries/mm-stm-cc2500-64-reta-v$MULTI_VERSION.bin; +# CC2500-only 64Kb LBT/EU builds +printf "\e[33;1mBuilding mm-stm-cc2500-64-aetr-lbt-v$MULTI_VERSION.bin\e[0m\n"; +opt_replace RETA AETR; +opt_add MULTI_EU; +buildMulti; +exitcode=$((exitcode+$?)); +mv build/Multiprotocol.ino.bin ./binaries/mm-stm-cc2500-64-aetr-lbt-v$MULTI_VERSION.bin; + +printf "\e[33;1mBuilding mm-stm-cc2500-64-taer-lbt-v$MULTI_VERSION.bin\e[0m\n"; +opt_replace AETR TAER; +buildMulti; +exitcode=$((exitcode+$?)); +mv build/Multiprotocol.ino.bin ./binaries/mm-stm-cc2500-64-taer-lbt-v$MULTI_VERSION.bin; + +printf "\e[33;1mBuilding mm-stm-cc2500-64-reta-lbt-v$MULTI_VERSION.bin\e[0m\n"; +opt_replace TAER RETA; +buildMulti; +exitcode=$((exitcode+$?)); +mv build/Multiprotocol.ino.bin ./binaries/mm-stm-cc2500-64-reta-lbt-v$MULTI_VERSION.bin; + exit $exitcode; diff --git a/buildroot/bin/build_release_stm32f1_no_debug b/buildroot/bin/build_release_stm32f1_no_debug index 42783b9..43a1744 100644 --- a/buildroot/bin/build_release_stm32f1_no_debug +++ b/buildroot/bin/build_release_stm32f1_no_debug @@ -3,11 +3,7 @@ source ./buildroot/bin/buildFunctions; 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"; - -# Generic 4-in-1 builds +# Generic 4-in-1 FCC builds printf "\e[33;1mBuilding mm-stm-serial-aetr-v$MULTI_VERSION.bin\e[0m\n"; opt_disable ENABLE_PPM; buildMulti; @@ -26,10 +22,30 @@ buildMulti; exitcode=$((exitcode+$?)); mv build/Multiprotocol.ino.bin ./binaries/mm-stm-serial-reta-v$MULTI_VERSION.bin; +# Generic 4-in-1 LBT/EU builds +printf "\e[33;1mBuilding mm-stm-serial-aetr-lbt-v$MULTI_VERSION.bin\e[0m\n"; +opt_replace RETA AETR; +opt_add MULTI_EU; +buildMulti; +exitcode=$((exitcode+$?)); +mv build/Multiprotocol.ino.bin ./binaries/mm-stm-serial-aetr-lbt-v$MULTI_VERSION.bin; + +printf "\e[33;1mBuilding mm-stm-serial-taer-lbt-v$MULTI_VERSION.bin\e[0m\n"; +opt_replace AETR TAER; +buildMulti; +exitcode=$((exitcode+$?)); +mv build/Multiprotocol.ino.bin ./binaries/mm-stm-serial-taer-lbt-v$MULTI_VERSION.bin; + +printf "\e[33;1mBuilding mm-stm-serial-reta-lbt-v$MULTI_VERSION.bin\e[0m\n"; +opt_replace TAER RETA; +buildMulti; +exitcode=$((exitcode+$?)); +mv build/Multiprotocol.ino.bin ./binaries/mm-stm-serial-reta-lbt-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_remove MULTI_EU; opt_replace RETA AETR; -#opt_disable $DIY_5IN1_DISABLED; opt_enable SX1276_INSTALLED; buildMulti; exitcode=$((exitcode+$?)); @@ -52,7 +68,6 @@ 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 "MULTI_5IN1_INTERNAL JP_TLite" buildMulti; exitcode=$((exitcode+$?)); @@ -70,7 +85,7 @@ buildMulti; exitcode=$((exitcode+$?)); mv build/Multiprotocol.ino.bin ./binaries/mm-tlite5in1-reta-v$MULTI_VERSION.bin; -# CC2500-only builds +# CC2500-only FCC builds printf "\e[33;1mBuilding mm-stm-cc2500-aetr-v$MULTI_VERSION.bin\e[0m\n"; opt_replace RETA AETR; opt_disable "MULTI_5IN1_INTERNAL JP_TLite" @@ -94,11 +109,32 @@ buildMulti; exitcode=$((exitcode+$?)); mv build/Multiprotocol.ino.bin ./binaries/mm-stm-cc2500-reta-v$MULTI_VERSION.bin; +# CC2500-only LBT/EU builds +printf "\e[33;1mBuilding mm-stm-cc2500-aetr-lbt-v$MULTI_VERSION.bin\e[0m\n"; +opt_replace RETA AETR; +opt_add MULTI_EU; +buildMulti; +exitcode=$((exitcode+$?)); +mv build/Multiprotocol.ino.bin ./binaries/mm-stm-cc2500-aetr-lbt-v$MULTI_VERSION.bin; + +printf "\e[33;1mBuilding mm-stm-cc2500-taer-lbt-v$MULTI_VERSION.bin\e[0m\n"; +opt_replace AETR TAER; +buildMulti; +exitcode=$((exitcode+$?)); +mv build/Multiprotocol.ino.bin ./binaries/mm-stm-cc2500-taer-lbt-v$MULTI_VERSION.bin; + +printf "\e[33;1mBuilding mm-stm-cc2500-reta-lbt-v$MULTI_VERSION.bin\e[0m\n"; +opt_replace TAER RETA; +buildMulti; +exitcode=$((exitcode+$?)); +mv build/Multiprotocol.ino.bin ./binaries/mm-stm-cc2500-reta-lbt-v$MULTI_VERSION.bin; + # 4-in-1 PPM builds printf "\e[33;1mBuilding mm-stm-ppm-aetr-v$MULTI_VERSION.bin\e[0m\n"; opt_enable A7105_INSTALLED; opt_enable CYRF6936_INSTALLED; opt_enable NRF24L01_INSTALLED; +opt_remove MULTI_EU; opt_enable ENABLE_PPM; opt_disable ENABLE_SERIAL; opt_replace RETA AETR; diff --git a/buildroot/bin/opt_remove b/buildroot/bin/opt_remove new file mode 100644 index 0000000..022c1b1 --- /dev/null +++ b/buildroot/bin/opt_remove @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +SED=$(which gsed || which sed) + +eval "${SED} -i '/#define \b${1}/d' Multiprotocol/_Config.h"