mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-12-14 03:23:15 +00:00
Merge remote-tracking branch 'refs/remotes/pascallanger/master' into benlye-multi-new
This commit is contained in:
@@ -124,7 +124,7 @@ static void __attribute__((unused)) CABELL_get_telemetry()
|
||||
if (NRF24L01_ReadReg(NRF24L01_07_STATUS) & _BV(NRF24L01_07_RX_DR))
|
||||
{ // data received from model
|
||||
NRF24L01_ReadPayload(packet, CABELL_TELEMETRY_PACKET_LENGTH);
|
||||
if ((packet[0] & 0x7F) == CABELL_RxTxPacket_t::RxMode_t::telemetryResponse) // ignore high order bit in compare because it toggles with each packet
|
||||
if ((packet[0] & 0x7F) == CABELL_RxTxPacket_t::telemetryResponse) // ignore high order bit in compare because it toggles with each packet
|
||||
{
|
||||
RX_RSSI = packet[1]; // Packet rate 0 to 255 where 255 is 100% packet rate
|
||||
v_lipo1 = packet[2]; // Directly from analog input of receiver, but reduced to 8-bit depth (0 to 255). Scaling depends on the input to the analog pin of the receiver.
|
||||
@@ -164,26 +164,26 @@ static void __attribute__((unused)) CABELL_send_packet(uint8_t bindMode)
|
||||
|
||||
if ((sub_protocol == CABELL_UNBIND) && !bindMode)
|
||||
{
|
||||
TxPacket.RxMode = CABELL_RxTxPacket_t::RxMode_t::unBind;
|
||||
TxPacket.RxMode = CABELL_RxTxPacket_t::unBind;
|
||||
TxPacket.option = option;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sub_protocol == CABELL_SET_FAIL_SAFE && !bindMode)
|
||||
TxPacket.RxMode = CABELL_RxTxPacket_t::RxMode_t::setFailSafe;
|
||||
TxPacket.RxMode = CABELL_RxTxPacket_t::setFailSafe;
|
||||
else
|
||||
{
|
||||
if (bindMode)
|
||||
TxPacket.RxMode = CABELL_RxTxPacket_t::RxMode_t::bind;
|
||||
TxPacket.RxMode = CABELL_RxTxPacket_t::bind;
|
||||
else
|
||||
{
|
||||
switch (sub_protocol)
|
||||
{
|
||||
case CABELL_V3_TELEMETRY:
|
||||
TxPacket.RxMode = CABELL_RxTxPacket_t::RxMode_t::normalWithTelemetry;
|
||||
TxPacket.RxMode = CABELL_RxTxPacket_t::normalWithTelemetry;
|
||||
break;
|
||||
default:
|
||||
TxPacket.RxMode = CABELL_RxTxPacket_t::RxMode_t::normal;
|
||||
TxPacket.RxMode = CABELL_RxTxPacket_t::normal;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
181
Multiprotocol/ESky150_nrf24l01.ino
Normal file
181
Multiprotocol/ESky150_nrf24l01.ino
Normal file
@@ -0,0 +1,181 @@
|
||||
/*
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// ESky protocol for small models since 2014 (150, 300, 150X, ...)
|
||||
|
||||
#if defined(ESKY150_NRF24L01_INO)
|
||||
|
||||
#include "iface_nrf24l01.h"
|
||||
|
||||
#define ESKY150_PAYLOADSIZE 15
|
||||
#define ESKY150_TX_ADDRESS_SIZE 4
|
||||
#define ESKY150_BINDING_PACKET_PERIOD 2000
|
||||
#define ESKY150_SENDING_PACKET_PERIOD 4800
|
||||
|
||||
static void __attribute__((unused)) ESKY150_init()
|
||||
{
|
||||
//Original TX always sets for channelx 0x22 and 0x4a
|
||||
// Use channels 2..79
|
||||
hopping_frequency[0] = rx_tx_addr[3]%37+2;
|
||||
hopping_frequency[1] = hopping_frequency[0] + 40;
|
||||
|
||||
NRF24L01_Initialize();
|
||||
NRF24L01_WriteReg(NRF24L01_00_CONFIG, (_BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO)));
|
||||
NRF24L01_WriteReg(NRF24L01_01_EN_AA, 0x00); // No Auto Acknoledgement
|
||||
NRF24L01_WriteReg(NRF24L01_02_EN_RXADDR, 0x01); // Enable data pipe 0
|
||||
NRF24L01_WriteReg(NRF24L01_03_SETUP_AW, 0x02); // 4-byte RX/TX address
|
||||
NRF24L01_WriteReg(NRF24L01_04_SETUP_RETR, 0); // Disable retransmit
|
||||
NRF24L01_SetPower();
|
||||
NRF24L01_SetBitrate(NRF24L01_BR_2M);
|
||||
NRF24L01_WriteReg(NRF24L01_07_STATUS, 0x70); // Clear data ready, data sent, and retransmit
|
||||
NRF24L01_WriteReg(NRF24L01_11_RX_PW_P0, ESKY150_PAYLOADSIZE); // bytes of data payload for pipe 0
|
||||
NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR, rx_tx_addr, ESKY150_TX_ADDRESS_SIZE);
|
||||
|
||||
NRF24L01_Activate(0x73);
|
||||
NRF24L01_WriteReg(NRF24L01_1C_DYNPD, 1); // Dynamic payload for data pipe 0
|
||||
// Enable: Dynamic Payload Length, Payload with ACK , W_TX_PAYLOAD_NOACK
|
||||
NRF24L01_WriteReg(NRF24L01_1D_FEATURE, _BV(NRF2401_1D_EN_DPL) | _BV(NRF2401_1D_EN_ACK_PAY) | _BV(NRF2401_1D_EN_DYN_ACK));
|
||||
NRF24L01_Activate(0x73);
|
||||
NRF24L01_FlushTx();
|
||||
// Turn radio power on
|
||||
NRF24L01_SetTxRxMode(TX_EN);
|
||||
}
|
||||
|
||||
static void __attribute__((unused)) ESKY150_bind_init()
|
||||
{
|
||||
uint8_t ESKY150_addr[ESKY150_TX_ADDRESS_SIZE] = { 0x73, 0x73, 0x74, 0x63 }; //This RX address "sstc" is fixed for ESky2
|
||||
|
||||
// Build packet
|
||||
packet[0] = rx_tx_addr[0];
|
||||
packet[1] = rx_tx_addr[1];
|
||||
packet[2] = rx_tx_addr[2];
|
||||
packet[3] = rx_tx_addr[3];
|
||||
packet[4] = ESKY150_addr[0];
|
||||
packet[5] = ESKY150_addr[1];
|
||||
packet[6] = ESKY150_addr[2];
|
||||
packet[7] = ESKY150_addr[3];
|
||||
packet[8] = rx_tx_addr[0];
|
||||
packet[9] = rx_tx_addr[1];
|
||||
packet[10] = rx_tx_addr[2];
|
||||
packet[11] = rx_tx_addr[3];
|
||||
packet[12] = 0;
|
||||
packet[13] = 0;
|
||||
packet[14] = 0;
|
||||
|
||||
// Bind address
|
||||
NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR, ESKY150_addr, ESKY150_TX_ADDRESS_SIZE);
|
||||
NRF24L01_WriteRegisterMulti(NRF24L01_0A_RX_ADDR_P0, ESKY150_addr, ESKY150_TX_ADDRESS_SIZE);
|
||||
|
||||
// Bind Channel 1
|
||||
NRF24L01_WriteReg(NRF24L01_05_RF_CH, 1);
|
||||
}
|
||||
|
||||
static void __attribute__((unused)) ESKY150_send_packet()
|
||||
{
|
||||
// Build packet
|
||||
uint16_t throttle=convert_channel_16b(THROTTLE,1000,2000);
|
||||
uint16_t aileron=convert_channel_16b(AILERON,1000,2000);
|
||||
uint16_t elevator=convert_channel_16b(ELEVATOR,1000,2000);
|
||||
uint16_t rudder=convert_channel_16b(RUDDER,1000,2000);
|
||||
//set unused channels to zero, for compatibility with older 4 channel models
|
||||
uint8_t flight_mode=0;
|
||||
uint16_t aux_ch6=0;
|
||||
uint8_t aux_ch7=0;
|
||||
if(option==1)
|
||||
{
|
||||
flight_mode=ESKY150_convert_2bit_channel(AUX1);
|
||||
aux_ch6=convert_channel_16b(AUX2,1000,2000);
|
||||
aux_ch7=ESKY150_convert_2bit_channel(AUX3);
|
||||
}
|
||||
packet[0] = hopping_frequency[0];
|
||||
packet[1] = hopping_frequency[1];
|
||||
packet[2] = ((flight_mode << 6) & 0xC0) | ((aux_ch7 << 4) & 0x30) | ((throttle >> 8) & 0xFF);
|
||||
packet[3] = throttle & 0xFF;
|
||||
packet[4] = ((aux_ch6 >> 4) & 0xF0) | ((aileron >> 8) & 0xFF); //and 0xFF works as values are anyways not bigger than 12 bits, but faster code like that
|
||||
packet[5] = aileron & 0xFF;
|
||||
packet[6] = (aux_ch6 & 0xF0) | ((elevator >> 8) & 0xFF); //and 0xFF works as values are anyways not bigger than 12 bits, but faster code like that
|
||||
packet[7] = elevator & 0xFF;
|
||||
packet[8] = ((aux_ch6 << 4) & 0xF0) | ((rudder >> 8) & 0xFF); //and 0xFF works as values are anyways not bigger than 12 bits, but faster code like that
|
||||
packet[9] = rudder & 0xFF;
|
||||
// The next 4 Bytes are sint8 trim values (TAER). As trims are already included within normal outputs, these values are set to zero.
|
||||
packet[10] = 0x00;
|
||||
packet[11] = 0x00;
|
||||
packet[12] = 0x00;
|
||||
packet[13] = 0x00;
|
||||
// Calculate checksum:
|
||||
uint8_t sum = 0;
|
||||
for (uint8_t i = 0; i < 14; ++i)
|
||||
sum += packet[i];
|
||||
packet[14] = sum;
|
||||
|
||||
// Hop on 2 channels
|
||||
hopping_frequency_no++;
|
||||
hopping_frequency_no&=0x01;
|
||||
NRF24L01_WriteReg(NRF24L01_05_RF_CH, hopping_frequency[hopping_frequency_no]);
|
||||
|
||||
// Clear packet status bits and TX FIFO
|
||||
NRF24L01_WriteReg(NRF24L01_07_STATUS, 0x70);
|
||||
NRF24L01_FlushTx();
|
||||
|
||||
// Send packet
|
||||
NRF24L01_WritePayload(packet, ESKY150_PAYLOADSIZE);
|
||||
|
||||
//Keep transmit power updated
|
||||
NRF24L01_SetPower();
|
||||
}
|
||||
|
||||
uint8_t ESKY150_convert_2bit_channel(uint8_t num)
|
||||
{
|
||||
if(Servo_data[num] > PPM_MAX_COMMAND)
|
||||
return 0x03;
|
||||
else
|
||||
if(Servo_data[num] < PPM_MIN_COMMAND)
|
||||
return 0x00;
|
||||
else
|
||||
if(Servo_data[num] > PPM_SWITCH)
|
||||
return 0x02;
|
||||
return 0x01;
|
||||
}
|
||||
|
||||
uint16_t ESKY150_callback()
|
||||
{
|
||||
if(IS_BIND_DONE_on)
|
||||
ESKY150_send_packet();
|
||||
else
|
||||
{
|
||||
NRF24L01_WritePayload(packet, ESKY150_PAYLOADSIZE);
|
||||
if (--bind_counter == 0)
|
||||
{
|
||||
BIND_DONE;
|
||||
// Change TX address from bind to normal mode
|
||||
NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR, rx_tx_addr, ESKY150_TX_ADDRESS_SIZE);
|
||||
}
|
||||
return ESKY150_BINDING_PACKET_PERIOD;
|
||||
}
|
||||
return ESKY150_SENDING_PACKET_PERIOD;
|
||||
}
|
||||
|
||||
uint16_t initESKY150(void)
|
||||
{
|
||||
ESKY150_init();
|
||||
if(IS_AUTOBIND_FLAG_on)
|
||||
{
|
||||
bind_counter=3000;
|
||||
ESKY150_bind_init();
|
||||
}
|
||||
hopping_frequency_no=0;
|
||||
return 10000;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -32,3 +32,4 @@
|
||||
32,GW008
|
||||
33,DM002
|
||||
34,CABELL,CAB_V3,C_TELEM,-,-,-,-,F_SAFE,UNBIND
|
||||
35,ESKY150
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 1
|
||||
#define VERSION_REVISION 6
|
||||
#define VERSION_PATCH_LEVEL 30
|
||||
#define VERSION_PATCH_LEVEL 31
|
||||
//******************
|
||||
// Protocols
|
||||
//******************
|
||||
@@ -60,6 +60,7 @@ enum PROTOCOLS
|
||||
MODE_GW008 = 32, // =>NRF24L01
|
||||
MODE_DM002 = 33, // =>NRF24L01
|
||||
MODE_CABELL = 34, // =>NRF24L01
|
||||
MODE_ESKY150 = 35, // =>NRF24L01
|
||||
};
|
||||
|
||||
enum Flysky
|
||||
@@ -333,7 +334,7 @@ enum FailSafeMode {
|
||||
|
||||
//Status messages
|
||||
#if defined(STM32_BOARD) && defined (SERIAL_DEBUG)
|
||||
#define debug(msg, ...) {char buf[64]; sprintf(buf, msg "\r\n", ##__VA_ARGS__); for(int i=0;buf[i] !=0; i++) StatusSerial_write(buf[i]);}
|
||||
#define debug(msg, ...) {char buf[64]; sprintf(buf, msg "\r\n", ##__VA_ARGS__); Serial.write(buf);}
|
||||
#else
|
||||
#define debug(...)
|
||||
#undef SERIAL_DEBUG
|
||||
@@ -532,6 +533,7 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
|
||||
GW008 32
|
||||
DM002 33
|
||||
CABELL 34
|
||||
ESKY150 35
|
||||
BindBit=> 0x80 1=Bind/0=No
|
||||
AutoBindBit=> 0x40 1=Yes /0=No
|
||||
RangeCheck=> 0x20 1=Yes /0=No
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
//#define DEBUG_TX
|
||||
//#define SERIAL_DEBUG // Only for STM32_BOARD on usart1
|
||||
//#define SERIAL_DEBUG // Only for STM32_BOARD compiled with Upload method "Serial"->usart1, "STM32duino bootloader"->USB serial
|
||||
|
||||
#define USE_MY_CONFIG
|
||||
|
||||
@@ -61,9 +61,6 @@
|
||||
void ISR_COMPB();
|
||||
extern "C"
|
||||
{
|
||||
#ifdef SERIAL_DEBUG
|
||||
void __irq_usart1(void);
|
||||
#endif
|
||||
void __irq_usart2(void);
|
||||
void __irq_usart3(void);
|
||||
}
|
||||
@@ -190,11 +187,6 @@ uint8_t pkt[MAX_PKT];//telemetry receiving packets
|
||||
volatile uint8_t tx_head=0;
|
||||
volatile uint8_t tx_tail=0;
|
||||
#endif // BASH_SERIAL
|
||||
#ifdef SERIAL_DEBUG
|
||||
volatile uint8_t tx_debug_buff[TXBUFFER_SIZE];
|
||||
volatile uint8_t tx_debug_head=0;
|
||||
volatile uint8_t tx_debug_tail=0;
|
||||
#endif // SERIAL_DEBUG
|
||||
uint8_t v_lipo1;
|
||||
uint8_t v_lipo2;
|
||||
uint8_t RX_RSSI;
|
||||
@@ -215,8 +207,8 @@ void setup()
|
||||
{
|
||||
// Setup diagnostic uart before anything else
|
||||
#ifdef SERIAL_DEBUG
|
||||
usart1_begin(115200,SERIAL_8N1);
|
||||
tx_debug_resume();
|
||||
Serial.begin(115200,SERIAL_8N1);
|
||||
while (!Serial); // Wait for ever for the serial port to connect...
|
||||
debug("Multiprotocol version: %d.%d.%d.%d", VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_PATCH_LEVEL);
|
||||
#endif
|
||||
|
||||
@@ -437,7 +429,7 @@ void setup()
|
||||
#endif //ENABLE_SERIAL
|
||||
}
|
||||
servo_mid=servo_min_100+servo_max_100; //In fact 2* mid_value
|
||||
debug("init complete");
|
||||
debug("Init complete");
|
||||
}
|
||||
|
||||
// Main
|
||||
@@ -701,18 +693,6 @@ inline void tx_resume()
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef SERIAL_DEBUG
|
||||
inline void tx_debug_resume()
|
||||
{
|
||||
USART1_BASE->CR1 |= USART_CR1_TXEIE;
|
||||
}
|
||||
|
||||
inline void tx_debug_pause()
|
||||
{
|
||||
USART1_BASE->CR1 &= ~ USART_CR1_TXEIE;
|
||||
}
|
||||
#endif // SERIAL_DEBUG
|
||||
|
||||
#ifdef STM32_BOARD
|
||||
void start_timer2()
|
||||
{
|
||||
@@ -1029,6 +1009,12 @@ static void protocol_init()
|
||||
remote_callback = CABELL_callback;
|
||||
break;
|
||||
#endif
|
||||
#if defined(ESKY150_NRF24L01_INO)
|
||||
case MODE_ESKY150:
|
||||
next_callback=initESKY150();
|
||||
remote_callback = ESKY150_callback;
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -732,19 +732,6 @@ void TelemetryUpdate()
|
||||
/**************************/
|
||||
/**************************/
|
||||
|
||||
#ifdef SERIAL_DEBUG
|
||||
void StatusSerial_write(uint8_t data)
|
||||
{
|
||||
uint8_t nextHead ;
|
||||
nextHead = tx_debug_head + 1 ;
|
||||
if ( nextHead >= TXBUFFER_SIZE )
|
||||
nextHead = 0 ;
|
||||
tx_debug_buff[nextHead]=data;
|
||||
tx_debug_head = nextHead ;
|
||||
tx_debug_resume();
|
||||
}
|
||||
#endif // SERIAL_DEBUG
|
||||
|
||||
#ifndef BASH_SERIAL
|
||||
// Routines for normal serial output
|
||||
void Serial_write(uint8_t data)
|
||||
@@ -864,29 +851,6 @@ void TelemetryUpdate()
|
||||
#endif
|
||||
}
|
||||
#ifdef STM32_BOARD
|
||||
#if defined(SERIAL_DEBUG)
|
||||
void __irq_usart1()
|
||||
{ // Transmit interrupt
|
||||
if(USART1_BASE->SR & USART_SR_TXE)
|
||||
{
|
||||
if(tx_debug_head!=tx_debug_tail)
|
||||
{
|
||||
if(++tx_debug_tail>=TXBUFFER_SIZE) //head
|
||||
tx_debug_tail=0;
|
||||
USART1_BASE->DR=tx_debug_buff[tx_debug_tail]; //clears TXE bit
|
||||
}
|
||||
if (tx_debug_tail == tx_debug_head)
|
||||
tx_debug_pause(); // Check if all data is transmitted . if yes disable transmitter UDRE interrupt
|
||||
}
|
||||
}
|
||||
void usart1_begin(uint32_t baud,uint32_t config )
|
||||
{
|
||||
usart_init(USART1);
|
||||
usart_config_gpios_async(USART1,GPIOA,PIN_MAP[PA10].gpio_bit,GPIOA,PIN_MAP[PA9].gpio_bit,config);
|
||||
usart_set_baud_rate(USART1, STM32_PCLK1, baud);
|
||||
usart_enable(USART1);
|
||||
}
|
||||
#endif
|
||||
void usart2_begin(uint32_t baud,uint32_t config )
|
||||
{
|
||||
usart_init(USART2);
|
||||
|
||||
@@ -13,17 +13,27 @@
|
||||
#endif
|
||||
#if defined (STM32_BOARD) && not defined (ORANGE_TX)
|
||||
//STM32
|
||||
#ifndef ARDUINO_GENERIC_STM32F103C
|
||||
#error You must select the board type "Generic STM32F103C series"
|
||||
#if not defined(ARDUINO_GENERIC_STM32F103C) && not defined(ARDUINO_MULTI_STM32_FLASH_FROM_TX) && not defined(ARDUINO_MULTI_STM32_NO_BOOT)
|
||||
#error You must select one of these boards: "Multi 4-in-1 (STM32F103CB)" or "Generic STM32F103C series"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//Change/Force configuration for the bootloader option
|
||||
#if defined ARDUINO_MULTI_FLASH_FROM_TX
|
||||
#define CHECK_FOR_BOOTLOADER
|
||||
// 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)
|
||||
#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
|
||||
#endif
|
||||
#if defined ARDUINO_MULTI_NO_BOOT
|
||||
#undef CHECK_FOR_BOOTLOADER
|
||||
|
||||
// Error if CHECK_FOR_BOOTLOADER is enabled but the 'Flash from TX' bootloader or upload method isn't selected.
|
||||
#if (defined(ARDUINO_MULTI_NO_BOOT) || defined(ARDUINO_MULTI_STM32_NO_BOOT)) && defined(CHECK_FOR_BOOTLOADER)
|
||||
#if defined(STM32_BOARD)
|
||||
#error "You have enabled CHECK_FOR_BOOTLOADER but not selected the 'Flash from TX' upload method."
|
||||
#else
|
||||
#error "You have enabled CHECK_FOR_BOOTLOADER but not selected the 'Flash from TX' bootloader."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//Change/Force configuration if OrangeTX
|
||||
|
||||
@@ -53,9 +53,9 @@
|
||||
/*** BOOTLOADER USE ***/
|
||||
/*************************/
|
||||
//Allow flashing multimodule directly with TX(erky9x or opentx modified firmwares)
|
||||
//Check https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/tree/master/BootLoaders
|
||||
//To enable this feature remove the "//" on the next line. It is automatically enabled/disabled when you use the AVR Multi boards.
|
||||
//#define CHECK_FOR_BOOTLOADER
|
||||
//Instructions: https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/tree/master/BootLoaders#compiling--uploading-firmware-with-the-flash-from-tx-bootloader
|
||||
//To enable this feature remove the "//" on the next line. Requires a compatible bootloader or upload method to be selected when you use the Multi 4-in-1 Boards Manager definitions.
|
||||
#define CHECK_FOR_BOOTLOADER
|
||||
|
||||
/****************/
|
||||
/*** RF CHIPS ***/
|
||||
@@ -103,44 +103,44 @@
|
||||
|
||||
//The protocols below need an A7105 to be installed
|
||||
#define FLYSKY_A7105_INO
|
||||
//#define HUBSAN_A7105_INO
|
||||
//#define AFHDS2A_A7105_INO
|
||||
#define HUBSAN_A7105_INO
|
||||
#define AFHDS2A_A7105_INO
|
||||
|
||||
//The protocols below need a CYRF6936 to be installed
|
||||
//#define DEVO_CYRF6936_INO
|
||||
//#define DSM_CYRF6936_INO
|
||||
//#define J6PRO_CYRF6936_INO
|
||||
//#define WK2x01_CYRF6936_INO
|
||||
#define DEVO_CYRF6936_INO
|
||||
#define DSM_CYRF6936_INO
|
||||
#define J6PRO_CYRF6936_INO
|
||||
#define WK2x01_CYRF6936_INO
|
||||
|
||||
//The protocols below need a CC2500 to be installed
|
||||
//#define FRSKYV_CC2500_INO
|
||||
#define FRSKYV_CC2500_INO
|
||||
#define FRSKYD_CC2500_INO
|
||||
#define FRSKYX_CC2500_INO
|
||||
#define SFHSS_CC2500_INO
|
||||
|
||||
//The protocols below need a NRF24L01 to be installed
|
||||
#define BAYANG_NRF24L01_INO
|
||||
//#define CG023_NRF24L01_INO
|
||||
//#define CX10_NRF24L01_INO // Include Q2X2 protocol
|
||||
//#define ESKY_NRF24L01_INO
|
||||
//#define HISKY_NRF24L01_INO
|
||||
//#define KN_NRF24L01_INO
|
||||
//#define SLT_NRF24L01_INO
|
||||
//#define SYMAX_NRF24L01_INO
|
||||
//#define V2X2_NRF24L01_INO
|
||||
//#define YD717_NRF24L01_INO
|
||||
//#define MT99XX_NRF24L01_INO
|
||||
#define CG023_NRF24L01_INO
|
||||
#define CX10_NRF24L01_INO // Include Q2X2 protocol
|
||||
#define ESKY_NRF24L01_INO
|
||||
#define HISKY_NRF24L01_INO
|
||||
#define KN_NRF24L01_INO
|
||||
#define SLT_NRF24L01_INO
|
||||
#define SYMAX_NRF24L01_INO
|
||||
#define V2X2_NRF24L01_INO
|
||||
#define YD717_NRF24L01_INO
|
||||
#define MT99XX_NRF24L01_INO
|
||||
#define MJXQ_NRF24L01_INO
|
||||
//#define SHENQI_NRF24L01_INO
|
||||
//#define FY326_NRF24L01_INO
|
||||
//#define FQ777_NRF24L01_INO
|
||||
//#define ASSAN_NRF24L01_INO
|
||||
//#define HONTAI_NRF24L01_INO
|
||||
//#define Q303_NRF24L01_INO
|
||||
//#define GW008_NRF24L01_INO
|
||||
//#define DM002_NRF24L01_INO
|
||||
//#define CABELL_NRF24L01_INO
|
||||
|
||||
#define SHENQI_NRF24L01_INO
|
||||
#define FY326_NRF24L01_INO
|
||||
#define FQ777_NRF24L01_INO
|
||||
#define ASSAN_NRF24L01_INO
|
||||
#define HONTAI_NRF24L01_INO
|
||||
#define Q303_NRF24L01_INO
|
||||
#define GW008_NRF24L01_INO
|
||||
#define DM002_NRF24L01_INO
|
||||
#define CABELL_NRF24L01_INO
|
||||
#define ESKY150_NRF24L01_INO
|
||||
|
||||
/**************************/
|
||||
/*** FAILSAFE SETTINGS ***/
|
||||
@@ -412,6 +412,7 @@ const PPM_Parameters PPM_prot[15]= {
|
||||
CABELL_V3_TELEMETRY
|
||||
CABELL_SET_FAIL_SAFE
|
||||
CABELL_UNBIND
|
||||
MODE_ESKY150
|
||||
*/
|
||||
|
||||
// RX_Num is used for model match. Using RX_Num values different for each receiver will prevent starting a model with the false config loaded...
|
||||
|
||||
@@ -1,24 +1,35 @@
|
||||
//#define FORCE_GLOBAL_ID 0x12345678
|
||||
|
||||
#if not defined STM32_BOARD
|
||||
// #undef AFHDS2A_A7105_INO
|
||||
#undef HUBSAN_A7105_INO
|
||||
#undef AFHDS2A_A7105_INO
|
||||
|
||||
// #undef DEVO_CYRF6936_INO
|
||||
// #undef J6PRO_CYRF6936_INO
|
||||
// #undef WK2x01_CYRF6936_INO
|
||||
#undef DEVO_CYRF6936_INO
|
||||
#undef DSM_CYRF6936_INO
|
||||
#undef J6PRO_CYRF6936_INO
|
||||
#undef WK2x01_CYRF6936_INO
|
||||
|
||||
// #undef FRSKYV_CC2500_INO
|
||||
// #undef FRSKYX_CC2500_INO
|
||||
#undef FRSKYV_CC2500_INO
|
||||
|
||||
// #undef KN_NRF24L01_INO
|
||||
// #undef SLT_NRF24L01_INO
|
||||
|
||||
// #undef FY326_NRF24L01_INO
|
||||
// #undef FQ777_NRF24L01_INO
|
||||
// #undef ASSAN_NRF24L01_INO
|
||||
// #undef HONTAI_NRF24L01_INO
|
||||
// #undef Q303_NRF24L01_INO
|
||||
// #undef GW008_NRF24L01_INO
|
||||
// #undef DM002_NRF24L01_INO
|
||||
// #undef CABELL_NRF24L01_INO
|
||||
#undef CG023_NRF24L01_INO
|
||||
#undef CX10_NRF24L01_INO // Include Q2X2 protocol
|
||||
#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 SHENQI_NRF24L01_INO
|
||||
#undef FY326_NRF24L01_INO
|
||||
#undef FQ777_NRF24L01_INO
|
||||
#undef ASSAN_NRF24L01_INO
|
||||
#undef HONTAI_NRF24L01_INO
|
||||
#undef Q303_NRF24L01_INO
|
||||
#undef GW008_NRF24L01_INO
|
||||
#undef DM002_NRF24L01_INO
|
||||
#undef CABELL_NRF24L01_INO
|
||||
#undef ESKY150_NRF24L01_INO
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user