mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2026-08-21 09:23:19 +00:00
Compare commits
22 Commits
3d50a39efb
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53ecce8a7c | ||
|
|
c8d0638b21 | ||
|
|
55a8412cc8 | ||
|
|
7fadec2d4f | ||
|
|
0c20c17c7d | ||
|
|
d8c3013bf4 | ||
|
|
b5e140bd23 | ||
|
|
90dcf034ba | ||
|
|
c223fb17b5 | ||
|
|
03921d36b9 | ||
|
|
780b4d9bcb | ||
|
|
d6a969ee28 | ||
|
|
9354abe5fd | ||
|
|
5984216fbd | ||
|
|
1fa5452c89 | ||
|
|
0f8aceb79f | ||
|
|
3bf4ffa764 | ||
|
|
d750e3b303 | ||
|
|
79b09468ac | ||
|
|
97fcd0bde0 | ||
|
|
463978939b | ||
|
|
0a7f74dc06 |
@@ -167,7 +167,7 @@
|
|||||||
74,3,RadioLink,RC4G,0,CH5,FS_CH1,FS_CH2,FS_CH3,FS_CH4
|
74,3,RadioLink,RC4G,0,CH5,FS_CH1,FS_CH2,FS_CH3,FS_CH4
|
||||||
74,4,RadioLink,Dumbo_P,0,CH5,CH6,CH7,CH8GY,CH9,CH10,n-a,n-a,n-a,n-a,n-a,n-a
|
74,4,RadioLink,Dumbo_P,0,CH5,CH6,CH7,CH8GY,CH9,CH10,n-a,n-a,n-a,n-a,n-a,n-a
|
||||||
76,0,Realacc,R11,1,Flip,Light,Calib,HLess,RTH,ThCut,Rotat
|
76,0,Realacc,R11,1,Flip,Light,Calib,HLess,RTH,ThCut,Rotat
|
||||||
76,1,Realacc,WLV8Tx,0,ST_Tr
|
76,1,Realacc,WLV8TX,0,ST_Tr
|
||||||
50,0,Redpine,Fast,0,sCH5,sCH6,sCH7,sCH8,sCH9,sCH10,sCH11,sCH12,sCH13,sCH14,sCH15,sCH16
|
50,0,Redpine,Fast,0,sCH5,sCH6,sCH7,sCH8,sCH9,sCH10,sCH11,sCH12,sCH13,sCH14,sCH15,sCH16
|
||||||
50,1,Redpine,Slow,0,sCH5,sCH6,sCH7,sCH8,sCH9,sCH10,sCH11,sCH12,sCH13,sCH14,sCH15,sCH16
|
50,1,Redpine,Slow,0,sCH5,sCH6,sCH7,sCH8,sCH9,sCH10,sCH11,sCH12,sCH13,sCH14,sCH15,sCH16
|
||||||
21,0,Futaba,SFHSS,0,CH5,CH6,CH7,CH8
|
21,0,Futaba,SFHSS,0,CH5,CH6,CH7,CH8
|
||||||
@@ -201,6 +201,7 @@
|
|||||||
62,0,XK,X450,1,FMode,TakeOf,Emerg,3D_6G,Pict,Video
|
62,0,XK,X450,1,FMode,TakeOf,Emerg,3D_6G,Pict,Video
|
||||||
62,1,XK,X420,1,FMode,TakeOf,Emerg,3D_6G,Pict,Video,Flip,Light
|
62,1,XK,X420,1,FMode,TakeOf,Emerg,3D_6G,Pict,Video,Flip,Light
|
||||||
62,2,XK,Cars,0,FMode,TakeOf,Emerg,3D_6G,Pict,Video,Flip,Light
|
62,2,XK,Cars,0,FMode,TakeOf,Emerg,3D_6G,Pict,Video,Flip,Light
|
||||||
|
109,0,MoFly,Std,0,FMode,Rate,BFlip,LRoll,RRoll,Invert
|
||||||
99,0,XK2,X4,0,Rate,Mode,Hover,Light,Stunt
|
99,0,XK2,X4,0,Rate,Mode,Hover,Light,Stunt
|
||||||
99,1,XK2,P10,0,Rate,Mode,Hover,Light,Stunt
|
99,1,XK2,P10,0,Rate,Mode,Hover,Light,Stunt
|
||||||
8,0,YD717,Std,1,Flip,Light,Pict,Video,HLess
|
8,0,YD717,Std,1,Flip,Light,Pict,Video,HLess
|
||||||
@@ -231,6 +232,8 @@
|
|||||||
97,0,SGF22,F22,1,Mode,Flip,LED,Pict,Video,TrRes,Bal,HiBal
|
97,0,SGF22,F22,1,Mode,Flip,LED,Pict,Video,TrRes,Bal,HiBal
|
||||||
97,1,SGF22,F22S,1,Mode,Flip,LED,Pict,Video,TrRes
|
97,1,SGF22,F22S,1,Mode,Flip,LED,Pict,Video,TrRes
|
||||||
97,2,SGF22,J20,1,Mode,Flip,LED,Pict,Video
|
97,2,SGF22,J20,1,Mode,Flip,LED,Pict,Video
|
||||||
|
97,3,SGF22,CX10,1,Mode,Flip,LED,Pict,Video
|
||||||
|
97,4,SGF22,T28,1,Mode,Stunt,LED,Invert,RTH,-,-,-,RTH_SET
|
||||||
61,0,EazyRC
|
61,0,EazyRC
|
||||||
98,0,Kyosho3,ASF,0
|
98,0,Kyosho3,ASF,0
|
||||||
100,0,YuXiang,Std,0,Lock,Rate,Land,Manual,Flip,Mode,Pitch
|
100,0,YuXiang,Std,0,Lock,Rate,Land,Manual,Flip,Mode,Pitch
|
||||||
@@ -241,3 +244,4 @@
|
|||||||
105,0,Shenqi2,Std,1
|
105,0,Shenqi2,Std,1
|
||||||
106,0,WL91x,Std,0
|
106,0,WL91x,Std,0
|
||||||
107,0,WPL,Std,0,Light,TH_DR,ST_DR
|
107,0,WPL,Std,0,Light,TH_DR,ST_DR
|
||||||
|
108,0,Ares,6HPA_Tx,0,CH5,CH6
|
||||||
|
|||||||
254
Multiprotocol/Ares_cc2500.ino
Normal file
254
Multiprotocol/Ares_cc2500.ino
Normal file
@@ -0,0 +1,254 @@
|
|||||||
|
/*
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
// Compatible with ARES 6HPA transmitter
|
||||||
|
|
||||||
|
#if defined(ARES_CC2500_INO)
|
||||||
|
|
||||||
|
#include "iface_cc2500.h"
|
||||||
|
|
||||||
|
//#define ARES_FORCE_ID
|
||||||
|
|
||||||
|
#define ARES_COARSE 0
|
||||||
|
|
||||||
|
#define ARES_PACKET_LEN 17
|
||||||
|
#define ARES_NUM_FREQUENCIES 60
|
||||||
|
|
||||||
|
enum {
|
||||||
|
ARES_START = 0x00,
|
||||||
|
ARES_CALIB = 0x01,
|
||||||
|
ARES_PREP = 0x02,
|
||||||
|
ARES_DATA = 0x03,
|
||||||
|
};
|
||||||
|
|
||||||
|
// CC2500 register init values captured from the ARES 6HPA transmitter
|
||||||
|
const PROGMEM uint8_t ARES_init_values[] = {
|
||||||
|
/* 00 */ 0x06, 0x2E, 0x2E, 0x07, 0x5A, 0x60, 0x30, 0x04,
|
||||||
|
/* 08 */ 0x05, 0x00, 0x00, 0x06, 0x00, 0x5C, 0xB1, 0x3B + ARES_COARSE,
|
||||||
|
/* 10 */ 0x6A, 0xF8, 0x03, 0x23, 0x7A, 0x44, 0x07, 0x30,
|
||||||
|
/* 18 */ 0x18, 0x16, 0x6C, 0x43, 0x40, 0x91, 0x87, 0x6B,
|
||||||
|
/* 20 */ 0xF8, 0x56, 0x10, 0xA9, 0x0A, 0x00, 0x11
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fixed hopping sequence captured from the ARES 6HPA transmitter.
|
||||||
|
// This is a permutation of 60 channel values spread across the band.
|
||||||
|
static const PROGMEM uint8_t ARES_hop[] = {
|
||||||
|
0xB0, 0x6F, 0x1D, 0xB4, 0x74, 0x20, 0xB8, 0xD8,
|
||||||
|
0x24, 0xBC, 0xDC, 0x28, 0x48, 0xE0, 0x2C, 0x4C,
|
||||||
|
0xE4, 0x90, 0x50, 0xE8, 0x94, 0x54, 0xEC, 0x00,
|
||||||
|
0x98, 0x58, 0x04, 0x9B, 0x5C, 0x08, 0xA0, 0xC0,
|
||||||
|
0x0C, 0xA4, 0xC3, 0x10, 0x30, 0xC6, 0x14, 0x34,
|
||||||
|
0xCC, 0x78, 0x38, 0xD0, 0x7C, 0x3C, 0xD4, 0x80,
|
||||||
|
0x40, 0x60, 0x84, 0x44, 0x64, 0x88, 0xA8, 0x68,
|
||||||
|
0x8C, 0xAC, 0x6C, 0x18
|
||||||
|
};
|
||||||
|
|
||||||
|
static void __attribute__((unused)) ARES_CC2500_init()
|
||||||
|
{
|
||||||
|
CC2500_Strobe(CC2500_SRES);
|
||||||
|
delayMilliseconds(1);
|
||||||
|
CC2500_Strobe(CC2500_SIDLE);
|
||||||
|
|
||||||
|
for (uint8_t i = 0; i < 39; ++i)
|
||||||
|
CC2500_WriteReg(i, pgm_read_byte_near(&ARES_init_values[i]));
|
||||||
|
|
||||||
|
CC2500_WriteReg(CC2500_0C_FSCTRL0, option);
|
||||||
|
prev_option = option;
|
||||||
|
|
||||||
|
// Write PATABLE to max power (0xFF for all 8 entries) as captured
|
||||||
|
for (uint8_t i = 0; i < 8; i++)
|
||||||
|
CC2500_WriteReg(CC2500_3E_PATABLE, 0xFF);
|
||||||
|
|
||||||
|
CC2500_SetTxRxMode(TX_EN);
|
||||||
|
CC2500_SetPower();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load hopping table
|
||||||
|
static void __attribute__((unused)) ARES_RF_channels()
|
||||||
|
{
|
||||||
|
for (uint8_t i = 0; i < ARES_NUM_FREQUENCIES; i++)
|
||||||
|
hopping_frequency[i] = pgm_read_byte_near(&ARES_hop[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __attribute__((unused)) ARES_tune_chan()
|
||||||
|
{
|
||||||
|
CC2500_Strobe(CC2500_SIDLE);
|
||||||
|
CC2500_WriteReg(CC2500_0A_CHANNR, hopping_frequency[hopping_frequency_no]);
|
||||||
|
CC2500_Strobe(CC2500_SFTX);
|
||||||
|
CC2500_Strobe(CC2500_SCAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __attribute__((unused)) ARES_change_chan_fast()
|
||||||
|
{
|
||||||
|
CC2500_Strobe(CC2500_SIDLE);
|
||||||
|
CC2500_WriteReg(CC2500_0A_CHANNR, hopping_frequency[hopping_frequency_no]);
|
||||||
|
CC2500_WriteReg(CC2500_25_FSCAL1, calData[hopping_frequency_no]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Advance the hop counter: cycles through 0-58 with step, inserting 59 when wrapping through 0
|
||||||
|
static uint8_t __attribute__((unused)) ARES_next_counter(uint8_t current, uint8_t step)
|
||||||
|
{
|
||||||
|
if (current == 59)
|
||||||
|
return 0;
|
||||||
|
uint8_t next = (current + step) % 59;
|
||||||
|
if (next == 0)
|
||||||
|
return 59;
|
||||||
|
return next;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __attribute__((unused)) ARES_build_packet()
|
||||||
|
{
|
||||||
|
// Length byte: 16 data bytes follow
|
||||||
|
packet[0] = 0x10;
|
||||||
|
|
||||||
|
// TX ID
|
||||||
|
packet[1] = rx_tx_addr[1];
|
||||||
|
packet[2] = rx_tx_addr[2];
|
||||||
|
packet[3] = rx_tx_addr[3];
|
||||||
|
|
||||||
|
// 6 channels encoded as interleaved 12-bit values in bytes 4-12
|
||||||
|
uint16_t ch[6];
|
||||||
|
for (uint8_t i = 0; i < 6; i++)
|
||||||
|
ch[i] = convert_channel_16b_nolimit(i, 1820, 3300, false);
|
||||||
|
|
||||||
|
packet[4] = ch[0] >> 4;
|
||||||
|
packet[5] = ((ch[0] & 0x0F) << 4) | (ch[1] & 0x0F);
|
||||||
|
packet[6] = ch[1] >> 4;
|
||||||
|
packet[7] = ch[2] >> 4;
|
||||||
|
packet[8] = ((ch[2] & 0x0F) << 4) | (ch[3] & 0x0F);
|
||||||
|
packet[9] = ch[3] >> 4;
|
||||||
|
packet[10] = ch[4] >> 4;
|
||||||
|
packet[11] = ((ch[4] & 0x0F) << 4) | (ch[5] & 0x0F);
|
||||||
|
packet[12] = ch[5] >> 4;
|
||||||
|
|
||||||
|
// Byte 16: counter step size (stored in crc, set to 1-58 in ARES_init)
|
||||||
|
uint8_t step = crc;
|
||||||
|
|
||||||
|
// Bytes 13-15: running counter with rotating bit 7 frame indicator
|
||||||
|
// The counter cycles 0-58 with a step, inserting 59 before wrapping to 0
|
||||||
|
// Each group of 3 packets has 3 consecutive counter values
|
||||||
|
// packet_count holds the current counter value
|
||||||
|
uint8_t c0 = packet_count;
|
||||||
|
uint8_t c1 = ARES_next_counter(c0, step);
|
||||||
|
uint8_t c2 = ARES_next_counter(c1, step);
|
||||||
|
|
||||||
|
// Frame indicator: each data frame is sent 3 times
|
||||||
|
// bind_phase tracks position 0/1/2 within the group of 3
|
||||||
|
packet[13] = c0;
|
||||||
|
packet[14] = c1;
|
||||||
|
packet[15] = c2;
|
||||||
|
packet[16] = step;
|
||||||
|
|
||||||
|
// Set the rotating frame bit (bit 7) on one of bytes 13-15
|
||||||
|
switch (bind_phase)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
packet[13] |= 0x80;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
packet[14] |= 0x80;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
packet[15] |= 0x80;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __attribute__((unused)) ARES_send_packet()
|
||||||
|
{
|
||||||
|
ARES_change_chan_fast();
|
||||||
|
CC2500_SetPower();
|
||||||
|
CC2500_WriteData(packet, ARES_PACKET_LEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ARES_PACKET_PERIOD 6670 // 6.67ms between packets
|
||||||
|
#define ARES_PREP_TIMING 2000
|
||||||
|
|
||||||
|
uint16_t ARES_callback()
|
||||||
|
{
|
||||||
|
switch(phase)
|
||||||
|
{
|
||||||
|
case ARES_START:
|
||||||
|
ARES_CC2500_init();
|
||||||
|
hopping_frequency_no = 0;
|
||||||
|
bind_phase = 0;
|
||||||
|
ARES_tune_chan();
|
||||||
|
phase = ARES_CALIB;
|
||||||
|
return ARES_PREP_TIMING;
|
||||||
|
case ARES_CALIB:
|
||||||
|
calData[hopping_frequency_no] = CC2500_ReadReg(CC2500_25_FSCAL1);
|
||||||
|
hopping_frequency_no++;
|
||||||
|
if (hopping_frequency_no < ARES_NUM_FREQUENCIES)
|
||||||
|
ARES_tune_chan();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hopping_frequency_no = 0;
|
||||||
|
phase = ARES_PREP;
|
||||||
|
}
|
||||||
|
return ARES_PREP_TIMING;
|
||||||
|
case ARES_PREP:
|
||||||
|
if (prev_option != option)
|
||||||
|
{
|
||||||
|
phase = ARES_START;
|
||||||
|
return ARES_PREP_TIMING;
|
||||||
|
}
|
||||||
|
#ifdef MULTI_SYNC
|
||||||
|
telemetry_set_input_sync(ARES_PACKET_PERIOD);
|
||||||
|
#endif
|
||||||
|
ARES_build_packet();
|
||||||
|
phase = ARES_DATA;
|
||||||
|
// Fall through
|
||||||
|
case ARES_DATA:
|
||||||
|
ARES_send_packet();
|
||||||
|
hopping_frequency_no++;
|
||||||
|
if (hopping_frequency_no >= ARES_NUM_FREQUENCIES)
|
||||||
|
hopping_frequency_no = 0;
|
||||||
|
bind_phase++;
|
||||||
|
if (bind_phase >= 3)
|
||||||
|
{
|
||||||
|
bind_phase = 0;
|
||||||
|
// Advance counter to start of next group
|
||||||
|
uint8_t step = crc;
|
||||||
|
packet_count = ARES_next_counter(packet_count, step);
|
||||||
|
packet_count = ARES_next_counter(packet_count, step);
|
||||||
|
packet_count = ARES_next_counter(packet_count, step);
|
||||||
|
}
|
||||||
|
phase = ARES_PREP;
|
||||||
|
return ARES_PACKET_PERIOD;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ARES_init()
|
||||||
|
{
|
||||||
|
BIND_DONE; // Autobind protocol - no TX-initiated bind phase
|
||||||
|
ARES_RF_channels();
|
||||||
|
|
||||||
|
// rx_tx_addr[1] and [2] are already set from MProtocol_id by the framework
|
||||||
|
// RX_num (0-63) in byte 3 provides model match
|
||||||
|
rx_tx_addr[3] = RX_num;
|
||||||
|
|
||||||
|
// Counter step and start from capture
|
||||||
|
crc = 23;
|
||||||
|
packet_count = 35;
|
||||||
|
|
||||||
|
#ifdef ARES_FORCE_ID
|
||||||
|
rx_tx_addr[1] = 0xDC;
|
||||||
|
rx_tx_addr[2] = 0xCC;
|
||||||
|
rx_tx_addr[3] = 0x00;
|
||||||
|
#endif
|
||||||
|
phase = ARES_START;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -54,7 +54,7 @@ static void __attribute__((unused)) KF606_send_packet()
|
|||||||
packet[len-2] = convert_channel_8b_limit_deadband(AILERON,0x00,0x80,0xFF,40); // Aileron: High rate:2B..80..DA
|
packet[len-2] = convert_channel_8b_limit_deadband(AILERON,0x00,0x80,0xFF,40); // Aileron: High rate:2B..80..DA
|
||||||
uint8_t p3;
|
uint8_t p3;
|
||||||
p3 = convert_channel_8b(CH5)>>3; // Aileron trim must be on a separated channel 01..10..1F
|
p3 = convert_channel_8b(CH5)>>3; // Aileron trim must be on a separated channel 01..10..1F
|
||||||
p3 += (packet[2]-0x80)>>3; // Drive trims for more aileron authority
|
p3 += (packet[len-2]-0x80)>>3; // Drive trims for more aileron authority
|
||||||
if(p3 > 0x80)
|
if(p3 > 0x80)
|
||||||
p3 = 0x01;
|
p3 = 0x01;
|
||||||
else if(p3 > 0x1F)
|
else if(p3 > 0x1F)
|
||||||
|
|||||||
@@ -129,6 +129,10 @@ static void __attribute__((unused)) MT99XX_send_packet()
|
|||||||
static uint8_t seq_num=0;
|
static uint8_t seq_num=0;
|
||||||
|
|
||||||
//Set RF freq
|
//Set RF freq
|
||||||
|
if(IS_BIND_IN_PROGRESS && sub_protocol == PA18+8)
|
||||||
|
XN297_RFChannel(0x02);
|
||||||
|
else
|
||||||
|
{
|
||||||
if(sub_protocol == LS)
|
if(sub_protocol == LS)
|
||||||
XN297_RFChannel(0x2D); // LS always transmits on the same channel
|
XN297_RFChannel(0x2D); // LS always transmits on the same channel
|
||||||
else
|
else
|
||||||
@@ -136,6 +140,7 @@ static void __attribute__((unused)) MT99XX_send_packet()
|
|||||||
XN297_RFChannel(0x4B); // FY805 always transmits on the same channel
|
XN297_RFChannel(0x4B); // FY805 always transmits on the same channel
|
||||||
else // MT99 & H7 & YZ & A180 & DRAGON & F949G & PA18
|
else // MT99 & H7 & YZ & A180 & DRAGON & F949G & PA18
|
||||||
XN297_Hopping(hopping_frequency_no);
|
XN297_Hopping(hopping_frequency_no);
|
||||||
|
}
|
||||||
|
|
||||||
if(IS_BIND_IN_PROGRESS)
|
if(IS_BIND_IN_PROGRESS)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
8,YD717,YD717,SKYWLKR,SYMAX4,XINXUN,NIHUI
|
8,YD717,YD717,SKYWLKR,SYMAX4,XINXUN,NIHUI
|
||||||
9,KN,WLTOYS,FEILUN
|
9,KN,WLTOYS,FEILUN
|
||||||
10,SymaX,SYMAX,SYMAX5C
|
10,SymaX,SYMAX,SYMAX5C
|
||||||
11,SLT,SLT_V1,SLT_V2,Q100,Q200,MR100,V1_4CH,RF_SIM
|
11,SLT,SLT_V1,SLT_V2,Q100,Q200,MR100,V1_4CH,RF_SIM,SLT6TX
|
||||||
12,CX10,GREEN,BLUE,DM007,---,J3015_1,J3015_2,MK33041
|
12,CX10,GREEN,BLUE,DM007,---,J3015_1,J3015_2,MK33041
|
||||||
13,CG023,CG023,YD829
|
13,CG023,CG023,YD829
|
||||||
14,Bayang,Bayang,H8S3D,X16_AH,IRDRONE,DHD_D4,QX100
|
14,Bayang,Bayang,H8S3D,X16_AH,IRDRONE,DHD_D4,QX100
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
73,Kyosho,FHSS,Hype
|
73,Kyosho,FHSS,Hype
|
||||||
74,RadioLink,Surface,Air,DumboRC,RC4G,Dumbo_P
|
74,RadioLink,Surface,Air,DumboRC,RC4G,Dumbo_P
|
||||||
75,---
|
75,---
|
||||||
76,Realacc,R11,WL-V8Tx
|
76,Realacc,R11,WLV8TX
|
||||||
77,OMP
|
77,OMP
|
||||||
78,M-Link
|
78,M-Link
|
||||||
79,WFLY,RF20x
|
79,WFLY,RF20x
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
94,Scorpio
|
94,Scorpio
|
||||||
95,BlueFly
|
95,BlueFly
|
||||||
96,BumbleB
|
96,BumbleB
|
||||||
97,SGF22,F22,F22S,J20
|
97,SGF22,F22,F22S,J20,CX10,T28
|
||||||
98,Kyosho3
|
98,Kyosho3
|
||||||
99,XK2,X4,P10
|
99,XK2,X4,P10
|
||||||
100,YuXiang
|
100,YuXiang
|
||||||
@@ -103,3 +103,5 @@
|
|||||||
105,Shenqi2
|
105,Shenqi2
|
||||||
106,WL91x
|
106,WL91x
|
||||||
107,WPL
|
107,WPL
|
||||||
|
108,Ares
|
||||||
|
109,MoFly
|
||||||
@@ -84,6 +84,7 @@ const char STR_FX[] ="FX";
|
|||||||
const char STR_BAYANG_RX[] ="BayanRX";
|
const char STR_BAYANG_RX[] ="BayanRX";
|
||||||
const char STR_PELIKAN[] ="Pelikan";
|
const char STR_PELIKAN[] ="Pelikan";
|
||||||
const char STR_XK[] ="XK";
|
const char STR_XK[] ="XK";
|
||||||
|
const char STR_MOFLY[] ="MoFly";
|
||||||
const char STR_XK2[] ="XK2";
|
const char STR_XK2[] ="XK2";
|
||||||
const char STR_XN297DUMP[] ="XN297DP";
|
const char STR_XN297DUMP[] ="XN297DP";
|
||||||
const char STR_FRSKYR9[] ="FrSkyR9";
|
const char STR_FRSKYR9[] ="FrSkyR9";
|
||||||
@@ -119,6 +120,7 @@ const char STR_JIABAILE[] ="JIABAILE";
|
|||||||
const char STR_KAMTOM[] ="KAMTOM";
|
const char STR_KAMTOM[] ="KAMTOM";
|
||||||
const char STR_WL91X[] ="WL91x";
|
const char STR_WL91X[] ="WL91x";
|
||||||
const char STR_WPL[] ="WPL";
|
const char STR_WPL[] ="WPL";
|
||||||
|
const char STR_ARES[] ="ARES";
|
||||||
|
|
||||||
const char STR_SUBTYPE_FLYSKY[] = "\x04""Std\0""V9x9""V6x6""V912""CX20";
|
const char STR_SUBTYPE_FLYSKY[] = "\x04""Std\0""V9x9""V6x6""V912""CX20";
|
||||||
const char STR_SUBTYPE_HUBSAN[] = "\x04""H107""H301""H501";
|
const char STR_SUBTYPE_HUBSAN[] = "\x04""H107""H301""H501";
|
||||||
@@ -139,7 +141,7 @@ const char STR_SUBTYPE_DEVO[] = "\x04""8ch\0""10ch""12ch""6ch\0""7ch\0";
|
|||||||
const char STR_SUBTYPE_YD717[] = "\x07""Std\0 ""SkyWlkr""Syma X4""XINXUN\0""NIHUI\0 ";
|
const char STR_SUBTYPE_YD717[] = "\x07""Std\0 ""SkyWlkr""Syma X4""XINXUN\0""NIHUI\0 ";
|
||||||
const char STR_SUBTYPE_KN[] = "\x06""WLtoys""FeiLun";
|
const char STR_SUBTYPE_KN[] = "\x06""WLtoys""FeiLun";
|
||||||
const char STR_SUBTYPE_SYMAX[] = "\x03""Std""X5C";
|
const char STR_SUBTYPE_SYMAX[] = "\x03""Std""X5C";
|
||||||
const char STR_SUBTYPE_SLT[] = "\x06""V1_6ch""V2_8ch""Q100\0 ""Q200\0 ""MR100\0""V1_4ch""RF_SIM";
|
const char STR_SUBTYPE_SLT[] = "\x06""V1_6ch""V2_8ch""Q100\0 ""Q200\0 ""MR100\0""V1_4ch""RF_SIM""SLT6TX";
|
||||||
const char STR_SUBTYPE_CX10[] = "\x07""Green\0 ""Blue\0 ""DM007\0 ""-\0 ""JC3015a""JC3015b""MK33041";
|
const char STR_SUBTYPE_CX10[] = "\x07""Green\0 ""Blue\0 ""DM007\0 ""-\0 ""JC3015a""JC3015b""MK33041";
|
||||||
const char STR_SUBTYPE_CG023[] = "\x05""Std\0 ""YD829";
|
const char STR_SUBTYPE_CG023[] = "\x05""Std\0 ""YD829";
|
||||||
const char STR_SUBTYPE_BAYANG[] = "\x07""Std\0 ""H8S3D\0 ""X16 AH\0""IRDrone""DHD D4\0""QX100\0 ";
|
const char STR_SUBTYPE_BAYANG[] = "\x07""Std\0 ""H8S3D\0 ""X16 AH\0""IRDrone""DHD D4\0""QX100\0 ";
|
||||||
@@ -169,7 +171,7 @@ const char STR_SUBTYPE_XN297DUMP[] = "\x07""250Kbps""1Mbps\0 ""2Mbps\0 ""Auto\0
|
|||||||
const char STR_SUBTYPE_ESKY150[] = "\x03""4ch""7ch";
|
const char STR_SUBTYPE_ESKY150[] = "\x03""4ch""7ch";
|
||||||
const char STR_SUBTYPE_ESKY150V2[] = "\x05""150V2";
|
const char STR_SUBTYPE_ESKY150V2[] = "\x05""150V2";
|
||||||
const char STR_SUBTYPE_V911S[] = "\x05""V911S""E119\0";
|
const char STR_SUBTYPE_V911S[] = "\x05""V911S""E119\0";
|
||||||
const char STR_SUBTYPE_XK[] = "\x04""X450""X420""Cars";
|
const char STR_SUBTYPE_XK[] = "\x05""X450\0""X420\0""Cars\0";
|
||||||
const char STR_SUBTYPE_XK2[] = "\x03""X4\0""P10";
|
const char STR_SUBTYPE_XK2[] = "\x03""X4\0""P10";
|
||||||
const char STR_SUBTYPE_FRSKYR9[] = "\x07""915MHz\0""868MHz\0""915 8ch""868 8ch""FCC\0 ""--\0 ""FCC 8ch""-- 8ch\0";
|
const char STR_SUBTYPE_FRSKYR9[] = "\x07""915MHz\0""868MHz\0""915 8ch""868 8ch""FCC\0 ""--\0 ""FCC 8ch""-- 8ch\0";
|
||||||
const char STR_SUBTYPE_ESKY[] = "\x03""Std""ET4";
|
const char STR_SUBTYPE_ESKY[] = "\x03""Std""ET4";
|
||||||
@@ -181,7 +183,7 @@ const char STR_SUBTYPE_HOTT[] = "\x07""Sync\0 ""No_Sync";
|
|||||||
const char STR_SUBTYPE_PELIKAN[] = "\x05""Pro\0 ""Lite\0""SCX24";
|
const char STR_SUBTYPE_PELIKAN[] = "\x05""Pro\0 ""Lite\0""SCX24";
|
||||||
const char STR_SUBTYPE_V761[] = "\x05""3ch\0 ""4ch\0 ""TOPRC";
|
const char STR_SUBTYPE_V761[] = "\x05""3ch\0 ""4ch\0 ""TOPRC";
|
||||||
const char STR_SUBTYPE_RLINK[] = "\x07""Surface""Air\0 ""DumboRC""RC4G\0 ""Dumbo_P";
|
const char STR_SUBTYPE_RLINK[] = "\x07""Surface""Air\0 ""DumboRC""RC4G\0 ""Dumbo_P";
|
||||||
const char STR_SUBTYPE_REALACC[] = "\x07""R11\0 ""WL-V8Tx";
|
const char STR_SUBTYPE_REALACC[] = "\x06""R11\0 ""WLV8TX";
|
||||||
const char STR_SUBTYPE_KYOSHO[] = "\x04""FHSS""Hype";
|
const char STR_SUBTYPE_KYOSHO[] = "\x04""FHSS""Hype";
|
||||||
const char STR_SUBTYPE_KYOSHO2[] = "\x05""KT-17";
|
const char STR_SUBTYPE_KYOSHO2[] = "\x05""KT-17";
|
||||||
const char STR_SUBTYPE_KYOSHO3[] = "\x03""ASF";
|
const char STR_SUBTYPE_KYOSHO3[] = "\x03""ASF";
|
||||||
@@ -191,7 +193,7 @@ const char STR_SUBTYPE_MOULDKG[] = "\x05""A4444""D4444""A664\0";
|
|||||||
const char STR_SUBTYPE_KF606[] = "\x06""KF606\0""MIG320""ZCZ50\0";
|
const char STR_SUBTYPE_KF606[] = "\x06""KF606\0""MIG320""ZCZ50\0";
|
||||||
const char STR_SUBTYPE_E129[] = "\x04""E129""C186";
|
const char STR_SUBTYPE_E129[] = "\x04""E129""C186";
|
||||||
const char STR_SUBTYPE_FX[] = "\x05""FX816""FX620""9630\0""Q560\0""QF012""BM26\0""A570\0";
|
const char STR_SUBTYPE_FX[] = "\x05""FX816""FX620""9630\0""Q560\0""QF012""BM26\0""A570\0";
|
||||||
const char STR_SUBTYPE_SGF22[] = "\x04""F22\0""F22S""J20\0""CX10";
|
const char STR_SUBTYPE_SGF22[] = "\x04""F22\0""F22S""J20\0""CX10""T28\0";
|
||||||
const char STR_SUBTYPE_JIABAILE[] = "\x04""Std\0""Gyro";
|
const char STR_SUBTYPE_JIABAILE[] = "\x04""Std\0""Gyro";
|
||||||
#define NO_SUBTYPE nullptr
|
#define NO_SUBTYPE nullptr
|
||||||
|
|
||||||
@@ -231,6 +233,9 @@ const mm_protocol_definition multi_protocols[] = {
|
|||||||
#if defined(MULTI_CONFIG_INO)
|
#if defined(MULTI_CONFIG_INO)
|
||||||
{PROTO_CONFIG, STR_CONFIG, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, 0, CONFIG_init, CONFIG_callback },
|
{PROTO_CONFIG, STR_CONFIG, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, 0, CONFIG_init, CONFIG_callback },
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(ARES_CC2500_INO)
|
||||||
|
{PROTO_ARES, STR_ARES, NO_SUBTYPE, 0, OPTION_RFTUNE, 0, 0, SW_CC2500, ARES_init, ARES_callback },
|
||||||
|
#endif
|
||||||
#if defined(ASSAN_NRF24L01_INO)
|
#if defined(ASSAN_NRF24L01_INO)
|
||||||
{PROTO_ASSAN, STR_ASSAN, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, ASSAN_init, ASSAN_callback },
|
{PROTO_ASSAN, STR_ASSAN, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, ASSAN_init, ASSAN_callback },
|
||||||
#endif
|
#endif
|
||||||
@@ -427,6 +432,9 @@ const mm_protocol_definition multi_protocols[] = {
|
|||||||
#if defined(MLINK_CYRF6936_INO)
|
#if defined(MLINK_CYRF6936_INO)
|
||||||
{PROTO_MLINK, STR_MLINK, NO_SUBTYPE, 0, OPTION_NONE, 1, 0, SW_CYRF, MLINK_init, MLINK_callback },
|
{PROTO_MLINK, STR_MLINK, NO_SUBTYPE, 0, OPTION_NONE, 1, 0, SW_CYRF, MLINK_init, MLINK_callback },
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(XK_CCNRF_INO)
|
||||||
|
{PROTO_MOFLY, STR_MOFLY, NO_SUBTYPE, 0, OPTION_RFTUNE, 0, 0, SW_NRF, XK_init, XK_callback },
|
||||||
|
#endif
|
||||||
#if defined(MOULDKG_NRF24L01_INO)
|
#if defined(MOULDKG_NRF24L01_INO)
|
||||||
{PROTO_MOULDKG, STR_MOULDKG, STR_SUBTYPE_MOULDKG, 3, OPTION_OPTION, 0, 0, SW_NRF, MOULDKG_init, MOULDKG_callback },
|
{PROTO_MOULDKG, STR_MOULDKG, STR_SUBTYPE_MOULDKG, 3, OPTION_OPTION, 0, 0, SW_NRF, MOULDKG_init, MOULDKG_callback },
|
||||||
#endif
|
#endif
|
||||||
@@ -476,7 +484,7 @@ const mm_protocol_definition multi_protocols[] = {
|
|||||||
{PROTO_SCORPIO, STR_SCORPIO, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_CYRF, SCORPIO_init, SCORPIO_callback },
|
{PROTO_SCORPIO, STR_SCORPIO, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_CYRF, SCORPIO_init, SCORPIO_callback },
|
||||||
#endif
|
#endif
|
||||||
#if defined(SGF22_NRF24L01_INO)
|
#if defined(SGF22_NRF24L01_INO)
|
||||||
{PROTO_SGF22, STR_SGF22, STR_SUBTYPE_SGF22, 4, OPTION_NONE, 0, 0, SW_NRF, SGF22_init, SGF22_callback },
|
{PROTO_SGF22, STR_SGF22, STR_SUBTYPE_SGF22, 5, OPTION_NONE, 0, 0, SW_NRF, SGF22_init, SGF22_callback },
|
||||||
#endif
|
#endif
|
||||||
#if defined(SHENQI_NRF24L01_INO)
|
#if defined(SHENQI_NRF24L01_INO)
|
||||||
{PROTO_SHENQI, STR_SHENQI, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, SHENQI_init, SHENQI_callback },
|
{PROTO_SHENQI, STR_SHENQI, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, SHENQI_init, SHENQI_callback },
|
||||||
@@ -488,7 +496,7 @@ const mm_protocol_definition multi_protocols[] = {
|
|||||||
{PROTO_SKYARTEC, STR_SKYARTEC, NO_SUBTYPE, 0, OPTION_RFTUNE, 0, 1, SW_CC2500, SKYARTEC_init, SKYARTEC_callback },
|
{PROTO_SKYARTEC, STR_SKYARTEC, NO_SUBTYPE, 0, OPTION_RFTUNE, 0, 1, SW_CC2500, SKYARTEC_init, SKYARTEC_callback },
|
||||||
#endif
|
#endif
|
||||||
#if defined(SLT_CCNRF_INO)
|
#if defined(SLT_CCNRF_INO)
|
||||||
{PROTO_SLT, STR_SLT, STR_SUBTYPE_SLT, 7, OPTION_RFTUNE, 0, 1, SW_NRF, SLT_init, SLT_callback },
|
{PROTO_SLT, STR_SLT, STR_SUBTYPE_SLT, 8, OPTION_RFTUNE, 0, 1, SW_NRF, SLT_init, SLT_callback },
|
||||||
#endif
|
#endif
|
||||||
#if defined(SYMAX_NRF24L01_INO)
|
#if defined(SYMAX_NRF24L01_INO)
|
||||||
{PROTO_SYMAX, STR_SYMAX, STR_SUBTYPE_SYMAX, 2, OPTION_NONE, 0, 0, SW_NRF, SYMAX_init, SYMAX_callback },
|
{PROTO_SYMAX, STR_SYMAX, STR_SUBTYPE_SYMAX, 2, OPTION_NONE, 0, 0, SW_NRF, SYMAX_init, SYMAX_callback },
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_REVISION 4
|
#define VERSION_REVISION 4
|
||||||
#define VERSION_PATCH_LEVEL 61
|
#define VERSION_PATCH_LEVEL 71
|
||||||
|
|
||||||
#define MODE_SERIAL 0
|
#define MODE_SERIAL 0
|
||||||
|
|
||||||
@@ -135,6 +135,8 @@ enum PROTOCOLS
|
|||||||
PROTO_SHENQI2 = 105, // =>NRF24L01
|
PROTO_SHENQI2 = 105, // =>NRF24L01
|
||||||
PROTO_WL91X = 106, // =>CC2500 & NRF24L01
|
PROTO_WL91X = 106, // =>CC2500 & NRF24L01
|
||||||
PROTO_WPL = 107, // =>NRF24L01
|
PROTO_WPL = 107, // =>NRF24L01
|
||||||
|
PROTO_ARES = 108, // =>CC2500
|
||||||
|
PROTO_MOFLY = 109, // =>CC2500 & NRF24L01
|
||||||
|
|
||||||
PROTO_NANORF = 126, // =>NRF24L01
|
PROTO_NANORF = 126, // =>NRF24L01
|
||||||
PROTO_TEST = 127, // =>CC2500
|
PROTO_TEST = 127, // =>CC2500
|
||||||
@@ -216,6 +218,7 @@ enum SLT
|
|||||||
MR100 = 4,
|
MR100 = 4,
|
||||||
SLT_V1_4 = 5,
|
SLT_V1_4 = 5,
|
||||||
RF_SIM = 6,
|
RF_SIM = 6,
|
||||||
|
SLT6TX = 7,
|
||||||
};
|
};
|
||||||
enum CX10
|
enum CX10
|
||||||
{
|
{
|
||||||
@@ -513,6 +516,7 @@ enum SGF22
|
|||||||
SGF22_F22S = 1,
|
SGF22_F22S = 1,
|
||||||
SGF22_J20 = 2,
|
SGF22_J20 = 2,
|
||||||
SGF22_CX10 = 3,
|
SGF22_CX10 = 3,
|
||||||
|
SGF22_T28 = 4,
|
||||||
};
|
};
|
||||||
enum JIABAILE
|
enum JIABAILE
|
||||||
{
|
{
|
||||||
@@ -1149,6 +1153,7 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
|
|||||||
MR100 4
|
MR100 4
|
||||||
SLT_V1_4CH 5
|
SLT_V1_4CH 5
|
||||||
RF_SIM 6
|
RF_SIM 6
|
||||||
|
SLT6TX 7
|
||||||
sub_protocol==E01X
|
sub_protocol==E01X
|
||||||
E012 0
|
E012 0
|
||||||
E015 1
|
E015 1
|
||||||
@@ -1169,6 +1174,8 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
|
|||||||
sub_protocol==XK
|
sub_protocol==XK
|
||||||
X450 0
|
X450 0
|
||||||
X420 1
|
X420 1
|
||||||
|
Cars 2
|
||||||
|
MoFly 3
|
||||||
sub_protocol==FRSKY_R9
|
sub_protocol==FRSKY_R9
|
||||||
R9_915 0
|
R9_915 0
|
||||||
R9_868 1
|
R9_868 1
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ uint16_t packet_period;
|
|||||||
uint8_t packet_count;
|
uint8_t packet_count;
|
||||||
uint8_t packet_sent;
|
uint8_t packet_sent;
|
||||||
uint8_t packet_length;
|
uint8_t packet_length;
|
||||||
#if defined(HOTT_CC2500_INO) || defined(ESKY150V2_CC2500_INO) || defined(MLINK_CYRF6936_INO)
|
#if defined(HOTT_CC2500_INO) || defined(ESKY150V2_CC2500_INO) || defined(MLINK_CYRF6936_INO) || defined(ARES_CC2500_INO)
|
||||||
uint8_t hopping_frequency[78];
|
uint8_t hopping_frequency[78];
|
||||||
#else
|
#else
|
||||||
uint8_t hopping_frequency[50];
|
uint8_t hopping_frequency[50];
|
||||||
@@ -130,7 +130,7 @@ uint16_t pps_counter;
|
|||||||
#ifdef CC2500_INSTALLED
|
#ifdef CC2500_INSTALLED
|
||||||
#ifdef SCANNER_CC2500_INO
|
#ifdef SCANNER_CC2500_INO
|
||||||
uint8_t calData[255];
|
uint8_t calData[255];
|
||||||
#elif defined(HOTT_CC2500_INO) || defined(ESKY150V2_CC2500_INO)
|
#elif defined(HOTT_CC2500_INO) || defined(ESKY150V2_CC2500_INO) || defined(ARES_CC2500_INO)
|
||||||
uint8_t calData[75];
|
uint8_t calData[75];
|
||||||
#else
|
#else
|
||||||
uint8_t calData[50];
|
uint8_t calData[50];
|
||||||
@@ -634,6 +634,11 @@ void setup()
|
|||||||
if (protocol==PROTO_HOTT)
|
if (protocol==PROTO_HOTT)
|
||||||
option = FORCE_HOTT_TUNING; // Use config-defined tuning value for HOTT
|
option = FORCE_HOTT_TUNING; // Use config-defined tuning value for HOTT
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
|
#if defined(FORCE_ARES_TUNING) && defined(ARES_CC2500_INO)
|
||||||
|
if (protocol==PROTO_ARES)
|
||||||
|
option = FORCE_ARES_TUNING; // Use config-defined tuning value for ARES
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
option = (uint8_t)PPM_prot_line->option; // Use radio-defined option value
|
option = (uint8_t)PPM_prot_line->option; // Use radio-defined option value
|
||||||
|
|
||||||
@@ -1376,6 +1381,11 @@ void update_serial_data()
|
|||||||
if (protocol==PROTO_HOTT)
|
if (protocol==PROTO_HOTT)
|
||||||
option=FORCE_HOTT_TUNING; // Use config-defined tuning value for HOTT
|
option=FORCE_HOTT_TUNING; // Use config-defined tuning value for HOTT
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
|
#if defined(FORCE_ARES_TUNING) && defined(ARES_CC2500_INO)
|
||||||
|
if (protocol==PROTO_ARES)
|
||||||
|
option=FORCE_ARES_TUNING; // Use config-defined tuning value for ARES
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
option=rx_ok_buff[3]; // Use radio-defined option value
|
option=rx_ok_buff[3]; // Use radio-defined option value
|
||||||
|
|
||||||
|
|||||||
@@ -16,13 +16,25 @@
|
|||||||
|
|
||||||
#include "iface_nrf250k.h"
|
#include "iface_nrf250k.h"
|
||||||
|
|
||||||
|
#if defined(CC2500_INSTALLED) && defined(NRF24L01_INSTALLED)
|
||||||
|
extern bool xn297_rf;
|
||||||
|
#endif
|
||||||
|
|
||||||
uint8_t cc2500_nrf_tx_addr[5], cc2500_nrf_addr_len;
|
uint8_t cc2500_nrf_tx_addr[5], cc2500_nrf_addr_len;
|
||||||
|
|
||||||
static void __attribute__((unused)) NRF250K_SetTXAddr(uint8_t* addr, uint8_t len)
|
static void __attribute__((unused)) NRF250K_SetTXAddr(uint8_t* addr, uint8_t len)
|
||||||
{
|
{
|
||||||
if (len > 5) len = 5;
|
if (len > 5) len = 5;
|
||||||
if (len < 3) len = 3;
|
if (len < 3) len = 3;
|
||||||
#if defined(CC2500_INSTALLED)
|
#if defined(CC2500_INSTALLED) && defined(NRF24L01_INSTALLED)
|
||||||
|
cc2500_nrf_addr_len = len;
|
||||||
|
memcpy(cc2500_nrf_tx_addr, addr, len);
|
||||||
|
if(xn297_rf == XN297_NRF)
|
||||||
|
{
|
||||||
|
NRF24L01_WriteReg(NRF24L01_03_SETUP_AW, len-2);
|
||||||
|
NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR, addr, len);
|
||||||
|
}
|
||||||
|
#elif defined(CC2500_INSTALLED)
|
||||||
cc2500_nrf_addr_len = len;
|
cc2500_nrf_addr_len = len;
|
||||||
memcpy(cc2500_nrf_tx_addr, addr, len);
|
memcpy(cc2500_nrf_tx_addr, addr, len);
|
||||||
#elif defined(NRF24L01_INSTALLED)
|
#elif defined(NRF24L01_INSTALLED)
|
||||||
@@ -33,6 +45,22 @@ static void __attribute__((unused)) NRF250K_SetTXAddr(uint8_t* addr, uint8_t len
|
|||||||
|
|
||||||
static void __attribute__((unused)) NRF250K_WritePayload(uint8_t* msg, uint8_t len)
|
static void __attribute__((unused)) NRF250K_WritePayload(uint8_t* msg, uint8_t len)
|
||||||
{
|
{
|
||||||
|
#if defined(NRF24L01_INSTALLED)
|
||||||
|
#if defined(CC2500_INSTALLED)
|
||||||
|
if(xn297_rf == XN297_NRF)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
if(len<=32)
|
||||||
|
{
|
||||||
|
NRF24L01_FlushTx();
|
||||||
|
NRF24L01_WriteReg(NRF24L01_07_STATUS, _BV(NRF24L01_07_TX_DS) | _BV(NRF24L01_07_RX_DR) | _BV(NRF24L01_07_MAX_RT));
|
||||||
|
NRF24L01_WritePayload(msg, len);
|
||||||
|
}
|
||||||
|
#if defined(CC2500_INSTALLED)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#if defined(CC2500_INSTALLED)
|
#if defined(CC2500_INSTALLED)
|
||||||
#if defined(ESKY150V2_CC2500_INO)
|
#if defined(ESKY150V2_CC2500_INO)
|
||||||
uint8_t buf[158];
|
uint8_t buf[158];
|
||||||
@@ -106,13 +134,6 @@ static void __attribute__((unused)) NRF250K_WritePayload(uint8_t* msg, uint8_t l
|
|||||||
CC2500_WriteRegisterMulti(CC2500_3F_TXFIFO, buff, last);
|
CC2500_WriteRegisterMulti(CC2500_3F_TXFIFO, buff, last);
|
||||||
CC2500_Strobe(CC2500_STX);
|
CC2500_Strobe(CC2500_STX);
|
||||||
}
|
}
|
||||||
#elif defined(NRF24L01_INSTALLED)
|
|
||||||
if(len<=32)
|
|
||||||
{
|
|
||||||
NRF24L01_FlushTx();
|
|
||||||
NRF24L01_WriteReg(NRF24L01_07_STATUS, _BV(NRF24L01_07_TX_DS) | _BV(NRF24L01_07_RX_DR) | _BV(NRF24L01_07_MAX_RT));
|
|
||||||
NRF24L01_WritePayload(msg, len);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ enum
|
|||||||
REALACC_WLV8TX_DATA
|
REALACC_WLV8TX_DATA
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t realacc_phase;
|
|
||||||
static bool realacc_wlv8tx_rx_b3;
|
|
||||||
#endif
|
#endif
|
||||||
static uint8_t realacc_bind_packet[REALACC_BIND_PAYLOAD_SIZE];
|
static uint8_t realacc_bind_packet[REALACC_BIND_PAYLOAD_SIZE];
|
||||||
|
|
||||||
@@ -100,7 +98,7 @@ static void __attribute__((unused)) REALACC_send_packet()
|
|||||||
static void __attribute__((unused)) REALACC_send_bind_packet()
|
static void __attribute__((unused)) REALACC_send_bind_packet()
|
||||||
{
|
{
|
||||||
#ifndef MULTI_AIR
|
#ifndef MULTI_AIR
|
||||||
if(sub_protocol == REALACC_WLV8TX && realacc_wlv8tx_rx_b3)
|
if(sub_protocol == REALACC_WLV8TX && rx_id[0])
|
||||||
{ // WLV8TX bind sent after RX packet B3 acknowledged
|
{ // WLV8TX bind sent after RX packet B3 acknowledged
|
||||||
packet[0] = 0xB4;
|
packet[0] = 0xB4;
|
||||||
packet[1] = rx_id[1];
|
packet[1] = rx_id[1];
|
||||||
@@ -187,21 +185,21 @@ static void __attribute__((unused)) REALACC_wlv8tx_process_rx()
|
|||||||
if(len != 3)
|
if(len != 3)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(packet_in[0] == 0xB3 && !realacc_wlv8tx_rx_b3)
|
if(packet_in[0] == 0xB3 && !rx_id[0])
|
||||||
{
|
{
|
||||||
realacc_wlv8tx_rx_b3 = true;
|
rx_id[0] = 0x01;
|
||||||
rx_id[1] = packet_in[1];
|
rx_id[1] = packet_in[1];
|
||||||
rx_id[2] = packet_in[2];
|
rx_id[2] = packet_in[2];
|
||||||
rx_tx_addr[2] ^= packet_in[1];
|
rx_tx_addr[2] ^= packet_in[1];
|
||||||
rx_tx_addr[3] ^= packet_in[2];
|
rx_tx_addr[3] ^= packet_in[2];
|
||||||
rx_tx_addr[3] |= 0x80;
|
rx_tx_addr[3] |= 0x80;
|
||||||
}
|
}
|
||||||
else if(packet_in[0] == 0xB5 && realacc_wlv8tx_rx_b3)
|
else if(packet_in[0] == 0xB5 && rx_id[0])
|
||||||
{
|
{
|
||||||
BIND_DONE;
|
BIND_DONE;
|
||||||
XN297_SetTXAddr(rx_tx_addr, 4);
|
XN297_SetTXAddr(rx_tx_addr, 4);
|
||||||
XN297_SetTxRxMode(TXRX_OFF);
|
XN297_SetTxRxMode(TXRX_OFF);
|
||||||
realacc_phase = REALACC_WLV8TX_DATA;
|
bind_phase = REALACC_WLV8TX_DATA;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -222,34 +220,34 @@ uint16_t REALACC_callback()
|
|||||||
#else
|
#else
|
||||||
if(sub_protocol == REALACC_WLV8TX)
|
if(sub_protocol == REALACC_WLV8TX)
|
||||||
{
|
{
|
||||||
if(realacc_phase == REALACC_WLV8TX_DATA)
|
if(bind_phase == REALACC_WLV8TX_DATA)
|
||||||
{
|
{
|
||||||
XN297_SetTxRxMode(TX_EN);
|
XN297_SetTxRxMode(TX_EN);
|
||||||
REALACC_send_packet();
|
REALACC_send_packet();
|
||||||
return WLV8TX_PACKET_PERIOD;
|
return WLV8TX_PACKET_PERIOD;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(realacc_phase == REALACC_WLV8TX_BIND_RX_SETUP)
|
if(bind_phase == REALACC_WLV8TX_BIND_RX_SETUP)
|
||||||
{
|
{
|
||||||
XN297_SetTxRxMode(TXRX_OFF);
|
XN297_SetTxRxMode(TXRX_OFF);
|
||||||
XN297_SetTxRxMode(RX_EN);
|
XN297_SetTxRxMode(RX_EN);
|
||||||
realacc_phase = REALACC_WLV8TX_BIND_RX_CHECK;
|
bind_phase = REALACC_WLV8TX_BIND_RX_CHECK;
|
||||||
return WLV8TX_PACKET_PERIOD/3;
|
return WLV8TX_PACKET_PERIOD/3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(realacc_phase == REALACC_WLV8TX_BIND_RX_CHECK)
|
if(bind_phase == REALACC_WLV8TX_BIND_RX_CHECK)
|
||||||
{
|
{
|
||||||
REALACC_wlv8tx_process_rx();
|
REALACC_wlv8tx_process_rx();
|
||||||
if(realacc_phase == REALACC_WLV8TX_DATA)
|
if(bind_phase == REALACC_WLV8TX_DATA)
|
||||||
return WLV8TX_PACKET_PERIOD;
|
return WLV8TX_PACKET_PERIOD;
|
||||||
realacc_phase = REALACC_WLV8TX_BIND_TX;
|
bind_phase = REALACC_WLV8TX_BIND_TX;
|
||||||
return WLV8TX_PACKET_PERIOD/3;
|
return WLV8TX_PACKET_PERIOD/3;
|
||||||
}
|
}
|
||||||
//Bind Phase
|
//Bind Phase
|
||||||
XN297_SetTxRxMode(TXRX_OFF);
|
XN297_SetTxRxMode(TXRX_OFF);
|
||||||
XN297_SetTxRxMode(TX_EN);
|
XN297_SetTxRxMode(TX_EN);
|
||||||
REALACC_send_bind_packet();
|
REALACC_send_bind_packet();
|
||||||
realacc_phase = REALACC_WLV8TX_BIND_RX_SETUP;
|
bind_phase = REALACC_WLV8TX_BIND_RX_SETUP;
|
||||||
return WLV8TX_PACKET_PERIOD/3;
|
return WLV8TX_PACKET_PERIOD/3;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -277,10 +275,10 @@ void REALACC_init()
|
|||||||
#ifndef MULTI_AIR
|
#ifndef MULTI_AIR
|
||||||
if(sub_protocol == REALACC_WLV8TX)
|
if(sub_protocol == REALACC_WLV8TX)
|
||||||
{
|
{
|
||||||
|
rx_id[0] = 0; // realacc_wlv8tx_rx_b3
|
||||||
rx_id[1] = 0;
|
rx_id[1] = 0;
|
||||||
rx_id[2] = 0;
|
rx_id[2] = 0;
|
||||||
realacc_wlv8tx_rx_b3 = false;
|
bind_phase = REALACC_WLV8TX_BIND_TX;
|
||||||
realacc_phase = REALACC_WLV8TX_BIND_TX;
|
|
||||||
memcpy(packet, realacc_bind_packet, 4);
|
memcpy(packet, realacc_bind_packet, 4);
|
||||||
packet[3] |= 0x80;
|
packet[3] |= 0x80;
|
||||||
XN297_SetRXAddr(packet, 4);
|
XN297_SetRXAddr(packet, 4);
|
||||||
|
|||||||
@@ -25,10 +25,12 @@ Multiprotocol is distributed in the hope that it will be useful,
|
|||||||
#define SGF22_PAYLOAD_SIZE 12
|
#define SGF22_PAYLOAD_SIZE 12
|
||||||
#define SGF22_BIND_COUNT 50
|
#define SGF22_BIND_COUNT 50
|
||||||
#define SGF22_RF_NUM_CHANNELS 4
|
#define SGF22_RF_NUM_CHANNELS 4
|
||||||
|
|
||||||
#define SGF22_BIND_RF_CHANNEL 78
|
#define SGF22_BIND_RF_CHANNEL 78
|
||||||
#define SGF22_F22S_BIND_RF_CHANNEL 10
|
#define SGF22_F22S_BIND_RF_CHANNEL 10
|
||||||
#define SGF22_J20_BIND_RF_CHANNEL 28
|
#define SGF22_J20_BIND_RF_CHANNEL 28
|
||||||
#define SGF22_CX10_BIND_RF_CHANNEL 48
|
#define SGF22_CX10_BIND_RF_CHANNEL 48
|
||||||
|
#define SGF22_T28_BIND_RF_CHANNEL 28
|
||||||
|
|
||||||
//packet[8]
|
//packet[8]
|
||||||
#define SGF22_FLAG_3D 0x00
|
#define SGF22_FLAG_3D 0x00
|
||||||
@@ -44,6 +46,8 @@ Multiprotocol is distributed in the hope that it will be useful,
|
|||||||
#define SGF22_FX922_FLAG_BALANCEHIGH 0x01
|
#define SGF22_FX922_FLAG_BALANCEHIGH 0x01
|
||||||
#define SGF22_FX922_FLAG_BALANCE 0x02
|
#define SGF22_FX922_FLAG_BALANCE 0x02
|
||||||
|
|
||||||
|
#define SGF22_T28_RTH_SET 0x20
|
||||||
|
#define SGF22_T28_FLAG_OPTIMIZED 0x80
|
||||||
|
|
||||||
//packet[9]
|
//packet[9]
|
||||||
#define SGF22_FLAG_TRIMRESET 0x04
|
#define SGF22_FLAG_TRIMRESET 0x04
|
||||||
@@ -88,9 +92,10 @@ static void __attribute__((unused)) SGF22_send_packet()
|
|||||||
| GET_FLAG(CH7_SW, SGF22_FLAG_LIGHT) // push up throttle trim for light in the stock TX
|
| GET_FLAG(CH7_SW, SGF22_FLAG_LIGHT) // push up throttle trim for light in the stock TX
|
||||||
| GET_FLAG(CH9_SW, SGF22_FLAG_VIDEO) // push down throttle trim for video in the stock TX
|
| GET_FLAG(CH9_SW, SGF22_FLAG_VIDEO) // push down throttle trim for video in the stock TX
|
||||||
| GET_FLAG(CH11_SW, SGF22_FX922_FLAG_BALANCE)
|
| GET_FLAG(CH11_SW, SGF22_FX922_FLAG_BALANCE)
|
||||||
| GET_FLAG(CH12_SW, SGF22_FX922_FLAG_BALANCEHIGH);
|
| GET_FLAG(CH12_SW, SGF22_FX922_FLAG_BALANCEHIGH)
|
||||||
|
| GET_FLAG(CH13_SW, SGF22_T28_RTH_SET);
|
||||||
if(Channel_data[CH5] > CHANNEL_MAX_COMMAND)
|
if(Channel_data[CH5] > CHANNEL_MAX_COMMAND)
|
||||||
packet[8] |= SGF22_FLAG_VERTICAL; // CH5 100%, vertical mode (torque)
|
packet[8] |= ( sub_protocol == SGF22_T28 ? SGF22_T28_FLAG_OPTIMIZED : SGF22_FLAG_VERTICAL); // CH5 100%, vertical mode (torque)
|
||||||
else if(Channel_data[CH5] > CHANNEL_MIN_COMMAND )
|
else if(Channel_data[CH5] > CHANNEL_MIN_COMMAND )
|
||||||
packet[8] |= ( sub_protocol == SGF22_J20 ? SGF22_J20_FLAG_HORIZONTAL : SGF22_FLAG_6G ); // CH5 0%, F22 & F22S - 6G mode, J20 - Horizontal mode
|
packet[8] |= ( sub_protocol == SGF22_J20 ? SGF22_J20_FLAG_HORIZONTAL : SGF22_FLAG_6G ); // CH5 0%, F22 & F22S - 6G mode, J20 - Horizontal mode
|
||||||
}
|
}
|
||||||
@@ -111,7 +116,7 @@ static void __attribute__((unused)) SGF22_send_packet()
|
|||||||
packet[10] = 0x42; // no fine tune
|
packet[10] = 0x42; // no fine tune
|
||||||
packet[11] = 0x10; // no fine tune
|
packet[11] = 0x10; // no fine tune
|
||||||
}
|
}
|
||||||
if(sub_protocol == SGF22_F22S)
|
if(sub_protocol == SGF22_F22S || sub_protocol == SGF22_T28)
|
||||||
packet[0] += 6;
|
packet[0] += 6;
|
||||||
else if (sub_protocol == SGF22_J20)
|
else if (sub_protocol == SGF22_J20)
|
||||||
packet[0] += 3;
|
packet[0] += 3;
|
||||||
@@ -200,7 +205,7 @@ static void __attribute__((unused)) SGF22_RF_init()
|
|||||||
XN297_SetRXAddr((uint8_t*)"\xC7\x95\x3C\xBB\xA5", SGF22_PAYLOAD_SIZE);
|
XN297_SetRXAddr((uint8_t*)"\xC7\x95\x3C\xBB\xA5", SGF22_PAYLOAD_SIZE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const uint8_t bind_chan[] = {SGF22_BIND_RF_CHANNEL, SGF22_F22S_BIND_RF_CHANNEL, SGF22_J20_BIND_RF_CHANNEL, SGF22_CX10_BIND_RF_CHANNEL};
|
const uint8_t bind_chan[] = {SGF22_BIND_RF_CHANNEL, SGF22_F22S_BIND_RF_CHANNEL, SGF22_J20_BIND_RF_CHANNEL, SGF22_CX10_BIND_RF_CHANNEL, SGF22_T28_BIND_RF_CHANNEL};
|
||||||
XN297_RFChannel(bind_chan[sub_protocol]); // Set bind channel
|
XN297_RFChannel(bind_chan[sub_protocol]); // Set bind channel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,9 @@
|
|||||||
#define SLT_NFREQCHANNELS 15
|
#define SLT_NFREQCHANNELS 15
|
||||||
#define SLT_TXID_SIZE 4
|
#define SLT_TXID_SIZE 4
|
||||||
#define SLT_BIND_CHANNEL 0x50
|
#define SLT_BIND_CHANNEL 0x50
|
||||||
|
#define SLT6_CH_MIN 182 // 10-bit AETR minimum (captures: 180-185, symmetric around 512)
|
||||||
|
#define SLT6_CH_MAX 842 // 10-bit AETR maximum (captures: 829-843, symmetric around 512)
|
||||||
|
#define SLT6_SW_THRESHOLD 273 // ~33% of half-range (820/3) for 3-position switch zones
|
||||||
|
|
||||||
enum{
|
enum{
|
||||||
// flags going to packet[6] (Q200)
|
// flags going to packet[6] (Q200)
|
||||||
@@ -54,9 +57,32 @@ enum {
|
|||||||
SLT_BIND2,
|
SLT_BIND2,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// SLT6 sub-cycle states: 3 sub-cycles per triple, each with 2 copies
|
||||||
|
enum {
|
||||||
|
SLT6_BUILD_A=0, // Build packet, configure for 7B sub-cycle
|
||||||
|
SLT6_DATA_A1, // Send 7B copy 1
|
||||||
|
SLT6_DATA_A2, // Send 7B copy 2, configure for 6B sub-cycle
|
||||||
|
SLT6_DATA_B1, // Send 6B copy 1
|
||||||
|
SLT6_DATA_B2, // Send 6B copy 2, configure for 5B sub-cycle
|
||||||
|
SLT6_DATA_C1, // Send 5B copy 1
|
||||||
|
SLT6_DATA_C2, // Send 5B copy 2
|
||||||
|
SLT6_BIND, // Send bind packet
|
||||||
|
};
|
||||||
|
|
||||||
|
// SLT6 address XOR values for the 3 sub-cycles
|
||||||
|
#define SLT6_ADDR_XOR_A 0x00 // 7B sub-cycle: base address
|
||||||
|
#define SLT6_ADDR_XOR_B 0x06 // 6B sub-cycle: byte[0] XOR 0x06
|
||||||
|
#define SLT6_ADDR_XOR_C 0x09 // 5B sub-cycle: byte[0] XOR 0x09
|
||||||
|
|
||||||
|
// SLT6 timing (from capture 12b, in microseconds)
|
||||||
|
#define SLT6_TIMING_SUBCYCLE 5994 // ~6000us between sub-cycle starts
|
||||||
|
#define SLT6_TIMING_PAIR 1633 // ~1633us between the two copies within a sub-cycle
|
||||||
|
#define SLT6_TIMING_BUILD 1000 // Build+config time at start of each triple
|
||||||
|
#define SLT6_TIMING_TRIPLE (3 * SLT6_TIMING_SUBCYCLE) // ~18ms triple period
|
||||||
|
|
||||||
static void __attribute__((unused)) SLT_RF_init()
|
static void __attribute__((unused)) SLT_RF_init()
|
||||||
{
|
{
|
||||||
NRF250K_Init();
|
NRF250K_Init(option == 0); // SLT: option==0 uses NRF24L01, option!=0 uses CC2500 with freq tuning
|
||||||
NRF250K_SetTXAddr(rx_tx_addr, SLT_TXID_SIZE);
|
NRF250K_SetTXAddr(rx_tx_addr, SLT_TXID_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,8 +178,6 @@ static void __attribute__((unused)) SLT_build_packet()
|
|||||||
packet[5] = convert_channel_8b(CH5);
|
packet[5] = convert_channel_8b(CH5);
|
||||||
packet[6] = convert_channel_8b(CH6);
|
packet[6] = convert_channel_8b(CH6);
|
||||||
|
|
||||||
//->V1 stops here
|
|
||||||
|
|
||||||
if(sub_protocol == Q200)
|
if(sub_protocol == Q200)
|
||||||
packet[6] = GET_FLAG(CH9_SW , FLAG_Q200_FMODE)
|
packet[6] = GET_FLAG(CH9_SW , FLAG_Q200_FMODE)
|
||||||
|GET_FLAG(CH10_SW, FLAG_Q200_FLIP)
|
|GET_FLAG(CH10_SW, FLAG_Q200_FLIP)
|
||||||
@@ -188,6 +212,47 @@ static void __attribute__((unused)) SLT_build_packet()
|
|||||||
calib_counter = 0;
|
calib_counter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SLT6: build 7-byte data packet from current channel values
|
||||||
|
static void __attribute__((unused)) SLT6_build_packet()
|
||||||
|
{
|
||||||
|
// aileron, elevator, throttle, rudder (10-bit, limited range)
|
||||||
|
uint8_t e = 0;
|
||||||
|
for (uint8_t i = 0; i < 4; ++i)
|
||||||
|
{
|
||||||
|
uint16_t v = convert_channel_16b_limit(CH_AETR[i], SLT6_CH_MIN, SLT6_CH_MAX);
|
||||||
|
packet[i] = v;
|
||||||
|
e = (e >> 2) | (uint8_t) ((v >> 2) & 0xC0);
|
||||||
|
}
|
||||||
|
packet[4] = e;
|
||||||
|
|
||||||
|
// Flight mode: 3 positions at ~33% each
|
||||||
|
if(Channel_data[CH5] > CHANNEL_MID + SLT6_SW_THRESHOLD)
|
||||||
|
packet[5] = 0xD0;
|
||||||
|
else if(Channel_data[CH5] < CHANNEL_MID - SLT6_SW_THRESHOLD)
|
||||||
|
packet[5] = 0x30;
|
||||||
|
else
|
||||||
|
packet[5] = 0x80;
|
||||||
|
|
||||||
|
// Panic: only active when CH6 is below -33%, center and up = no panic
|
||||||
|
if(Channel_data[CH6] < CHANNEL_MID - SLT6_SW_THRESHOLD)
|
||||||
|
packet[6] = 0x30;
|
||||||
|
else
|
||||||
|
packet[6] = 0xD0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// SLT6: configure radio for a sub-cycle (set address and channel)
|
||||||
|
static void __attribute__((unused)) SLT6_configure_radio(uint8_t addr_xor, uint8_t hop_offset)
|
||||||
|
{
|
||||||
|
SLT_wait_radio();
|
||||||
|
// Set TX address with XOR on byte[0]
|
||||||
|
uint8_t addr[SLT_TXID_SIZE];
|
||||||
|
memcpy(addr, rx_tx_addr, SLT_TXID_SIZE);
|
||||||
|
addr[0] ^= addr_xor;
|
||||||
|
NRF250K_SetTXAddr(addr, SLT_TXID_SIZE);
|
||||||
|
// Set RF channel
|
||||||
|
NRF250K_Hopping((hopping_frequency_no + hop_offset) % SLT_NFREQCHANNELS);
|
||||||
|
}
|
||||||
|
|
||||||
static void __attribute__((unused)) SLT_send_bind_packet()
|
static void __attribute__((unused)) SLT_send_bind_packet()
|
||||||
{
|
{
|
||||||
SLT_wait_radio();
|
SLT_wait_radio();
|
||||||
@@ -197,7 +262,7 @@ static void __attribute__((unused)) SLT_send_bind_packet()
|
|||||||
BIND_DONE;
|
BIND_DONE;
|
||||||
NRF250K_SetTXAddr((uint8_t *)"\x7E\xB8\x63\xA9", SLT_TXID_SIZE);
|
NRF250K_SetTXAddr((uint8_t *)"\x7E\xB8\x63\xA9", SLT_TXID_SIZE);
|
||||||
memcpy((void*)packet, (void*)rx_tx_addr, SLT_TXID_SIZE);
|
memcpy((void*)packet, (void*)rx_tx_addr, SLT_TXID_SIZE);
|
||||||
if(phase == SLT_BIND2)
|
if(phase == SLT_BIND2 || phase == SLT6_BIND)
|
||||||
SLT_send_packet(SLT_TXID_SIZE);
|
SLT_send_packet(SLT_TXID_SIZE);
|
||||||
else // SLT_BIND1
|
else // SLT_BIND1
|
||||||
SLT_send_packet(SLT_PAYLOADSIZE_V2);
|
SLT_send_packet(SLT_PAYLOADSIZE_V2);
|
||||||
@@ -210,8 +275,71 @@ static void __attribute__((unused)) SLT_send_bind_packet()
|
|||||||
#define SLT_V1_TIMING_BIND2 1000
|
#define SLT_V1_TIMING_BIND2 1000
|
||||||
#define SLT_V2_TIMING_BIND1 6507
|
#define SLT_V2_TIMING_BIND1 6507
|
||||||
#define SLT_V2_TIMING_BIND2 2112
|
#define SLT_V2_TIMING_BIND2 2112
|
||||||
|
|
||||||
|
// SLT6 callback: triple-address state machine
|
||||||
|
// Each triple: 3 sub-cycles (7B, 6B, 5B), each sent twice, with different addresses and channels
|
||||||
|
static uint16_t __attribute__((unused)) SLT6_callback()
|
||||||
|
{
|
||||||
|
switch (phase)
|
||||||
|
{
|
||||||
|
case SLT6_BUILD_A:
|
||||||
|
#ifdef MULTI_SYNC
|
||||||
|
telemetry_set_input_sync(SLT6_TIMING_TRIPLE);
|
||||||
|
#endif
|
||||||
|
SLT6_build_packet();
|
||||||
|
NRF250K_SetPower();
|
||||||
|
SLT6_configure_radio(SLT6_ADDR_XOR_A, 0); // 7B sub-cycle: base address, hop+0
|
||||||
|
phase = SLT6_DATA_A1;
|
||||||
|
return SLT6_TIMING_BUILD;
|
||||||
|
case SLT6_DATA_A1:
|
||||||
|
SLT_send_packet(7);
|
||||||
|
phase = SLT6_DATA_A2;
|
||||||
|
return SLT6_TIMING_PAIR; // 1633us between copies
|
||||||
|
case SLT6_DATA_A2:
|
||||||
|
SLT_send_packet(7);
|
||||||
|
SLT6_configure_radio(SLT6_ADDR_XOR_B, 3); // 6B sub-cycle: XOR 0x06 address, hop+3
|
||||||
|
phase = SLT6_DATA_B1;
|
||||||
|
return SLT6_TIMING_SUBCYCLE - SLT6_TIMING_PAIR; // 4361us to next sub-cycle TX
|
||||||
|
case SLT6_DATA_B1:
|
||||||
|
SLT_send_packet(6);
|
||||||
|
phase = SLT6_DATA_B2;
|
||||||
|
return SLT6_TIMING_PAIR;
|
||||||
|
case SLT6_DATA_B2:
|
||||||
|
SLT_send_packet(6);
|
||||||
|
SLT6_configure_radio(SLT6_ADDR_XOR_C, 6); // 5B sub-cycle: XOR 0x09 address, hop+6
|
||||||
|
phase = SLT6_DATA_C1;
|
||||||
|
return SLT6_TIMING_SUBCYCLE - SLT6_TIMING_PAIR; // 4361us
|
||||||
|
case SLT6_DATA_C1:
|
||||||
|
SLT_send_packet(5);
|
||||||
|
phase = SLT6_DATA_C2;
|
||||||
|
return SLT6_TIMING_PAIR;
|
||||||
|
case SLT6_DATA_C2:
|
||||||
|
SLT_send_packet(5);
|
||||||
|
// Advance hopping for next triple
|
||||||
|
if (++hopping_frequency_no >= SLT_NFREQCHANNELS)
|
||||||
|
hopping_frequency_no = 0;
|
||||||
|
if (++packet_count >= 100)
|
||||||
|
{// Send bind packet periodically
|
||||||
|
packet_count = 0;
|
||||||
|
phase = SLT6_BIND;
|
||||||
|
return SLT_V1_TIMING_BIND2;
|
||||||
|
}
|
||||||
|
phase = SLT6_BUILD_A;
|
||||||
|
return SLT6_TIMING_SUBCYCLE - SLT6_TIMING_PAIR - SLT6_TIMING_BUILD; // Gap before next build
|
||||||
|
case SLT6_BIND:
|
||||||
|
SLT_send_bind_packet();
|
||||||
|
phase = SLT6_BUILD_A;
|
||||||
|
return SLT6_TIMING_SUBCYCLE - SLT6_TIMING_PAIR - SLT6_TIMING_BUILD;
|
||||||
|
}
|
||||||
|
return SLT6_TIMING_TRIPLE;
|
||||||
|
}
|
||||||
|
|
||||||
uint16_t SLT_callback()
|
uint16_t SLT_callback()
|
||||||
{
|
{
|
||||||
|
// SLT6 has its own state machine
|
||||||
|
if(sub_protocol == SLT6TX)
|
||||||
|
return SLT6_callback();
|
||||||
|
|
||||||
switch (phase)
|
switch (phase)
|
||||||
{
|
{
|
||||||
case SLT_BUILD:
|
case SLT_BUILD:
|
||||||
@@ -285,7 +413,15 @@ void SLT_init()
|
|||||||
packet_sent = 0;
|
packet_sent = 0;
|
||||||
hopping_frequency_no = 0;
|
hopping_frequency_no = 0;
|
||||||
|
|
||||||
if(sub_protocol == SLT_V1)
|
if(sub_protocol == SLT6TX)
|
||||||
|
{
|
||||||
|
hopping_frequency_no = 1; // SLT6 starts hopping at index 1 (verified from captures)
|
||||||
|
// packet_length not used for SLT6 (lengths vary per sub-cycle)
|
||||||
|
#ifdef MULTI_SYNC
|
||||||
|
packet_period = SLT6_TIMING_TRIPLE;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else if(sub_protocol == SLT_V1)
|
||||||
{
|
{
|
||||||
packet_length = SLT_PAYLOADSIZE_V1;
|
packet_length = SLT_PAYLOADSIZE_V1;
|
||||||
#ifdef MULTI_SYNC
|
#ifdef MULTI_SYNC
|
||||||
@@ -326,6 +462,9 @@ void SLT_init()
|
|||||||
SLT_RF_init();
|
SLT_RF_init();
|
||||||
SLT_set_freq();
|
SLT_set_freq();
|
||||||
|
|
||||||
|
if(sub_protocol == SLT6TX)
|
||||||
|
phase = SLT6_BUILD_A;
|
||||||
|
else
|
||||||
phase = SLT_BUILD;
|
phase = SLT_BUILD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,6 +69,11 @@
|
|||||||
|
|
||||||
// Check forced tuning values are valid
|
// Check forced tuning values are valid
|
||||||
//CC2500
|
//CC2500
|
||||||
|
#ifdef FORCE_ARES_TUNING
|
||||||
|
#if ( FORCE_ARES_TUNING < -127 ) || ( FORCE_ARES_TUNING > 127 )
|
||||||
|
#error "The ARES forced frequency tuning value is outside of the range -127..127."
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#ifdef FORCE_CORONA_TUNING
|
#ifdef FORCE_CORONA_TUNING
|
||||||
#if ( FORCE_CORONA_TUNING < -127 ) || ( FORCE_CORONA_TUNING > 127 )
|
#if ( FORCE_CORONA_TUNING < -127 ) || ( FORCE_CORONA_TUNING > 127 )
|
||||||
#error "The CORONA forced frequency tuning value is outside of the range -127..127."
|
#error "The CORONA forced frequency tuning value is outside of the range -127..127."
|
||||||
@@ -276,6 +281,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if not defined(CC2500_INSTALLED) || defined MULTI_EU
|
#if not defined(CC2500_INSTALLED) || defined MULTI_EU
|
||||||
|
#undef ARES_CC2500_INO
|
||||||
#undef CORONA_CC2500_INO
|
#undef CORONA_CC2500_INO
|
||||||
#undef E016HV2_CC2500_INO
|
#undef E016HV2_CC2500_INO
|
||||||
#undef ESKY150V2_CC2500_INO
|
#undef ESKY150V2_CC2500_INO
|
||||||
@@ -381,12 +387,9 @@
|
|||||||
|
|
||||||
#ifdef MULTI_AIR
|
#ifdef MULTI_AIR
|
||||||
#undef JOYSWAY_A7105_INO
|
#undef JOYSWAY_A7105_INO
|
||||||
//#undef KYOSHO_A7105_INO
|
|
||||||
//#undef PELIKAN_A7105_INO
|
|
||||||
#undef LOSI_CYRF6936_INO //Need DSM to be enabled
|
#undef LOSI_CYRF6936_INO //Need DSM to be enabled
|
||||||
#undef TRAXXAS_CYRF6936_INO
|
#undef TRAXXAS_CYRF6936_INO
|
||||||
#undef EAZYRC_NRF24L01_INO
|
#undef EAZYRC_NRF24L01_INO
|
||||||
//#undef KYOSHO2_NRF24L01_INO
|
|
||||||
#undef KYOSHO3_CYRF6936_INO
|
#undef KYOSHO3_CYRF6936_INO
|
||||||
#undef MOULDKG_NRF24L01_INO
|
#undef MOULDKG_NRF24L01_INO
|
||||||
#undef SHENQI_NRF24L01_INO
|
#undef SHENQI_NRF24L01_INO
|
||||||
@@ -400,6 +403,7 @@
|
|||||||
|
|
||||||
#if defined(MULTI_AIR) || defined(MCU_STM32F103C8)
|
#if defined(MULTI_AIR) || defined(MCU_STM32F103C8)
|
||||||
// Save flash space...
|
// Save flash space...
|
||||||
|
#undef ARES_CC2500_INO
|
||||||
#undef BUMBLEB_CCNRF_INO
|
#undef BUMBLEB_CCNRF_INO
|
||||||
#undef CABELL_NRF24L01_INO
|
#undef CABELL_NRF24L01_INO
|
||||||
#undef FQ777_NRF24L01_INO
|
#undef FQ777_NRF24L01_INO
|
||||||
@@ -410,6 +414,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MULTI_SURFACE
|
#ifdef MULTI_SURFACE
|
||||||
|
#undef ARES_CC2500_INO
|
||||||
#undef BUGS_A7105_INO
|
#undef BUGS_A7105_INO
|
||||||
#undef HEIGHT_A7105_INO
|
#undef HEIGHT_A7105_INO
|
||||||
#undef HUBSAN_A7105_INO
|
#undef HUBSAN_A7105_INO
|
||||||
@@ -503,6 +508,7 @@
|
|||||||
#undef OMP_HUB_TELEMETRY
|
#undef OMP_HUB_TELEMETRY
|
||||||
#undef V761_HUB_TELEMETRY
|
#undef V761_HUB_TELEMETRY
|
||||||
#undef FX_HUB_TELEMETRY
|
#undef FX_HUB_TELEMETRY
|
||||||
|
#undef XK_HUB_TELEMETRY
|
||||||
#undef XK2_HUB_TELEMETRY
|
#undef XK2_HUB_TELEMETRY
|
||||||
#undef SGF22_HUB_TELEMETRY
|
#undef SGF22_HUB_TELEMETRY
|
||||||
#undef KAMTOM_HUB_TELEMETRY
|
#undef KAMTOM_HUB_TELEMETRY
|
||||||
@@ -548,6 +554,9 @@
|
|||||||
#if not defined(FX_NRF24L01_INO)
|
#if not defined(FX_NRF24L01_INO)
|
||||||
#undef FX_HUB_TELEMETRY
|
#undef FX_HUB_TELEMETRY
|
||||||
#endif
|
#endif
|
||||||
|
#if not defined(XK_CCNRF_INO)
|
||||||
|
#undef XK_HUB_TELEMETRY
|
||||||
|
#endif
|
||||||
#if not defined(XK2_CCNRF_INO)
|
#if not defined(XK2_CCNRF_INO)
|
||||||
#undef XK2_HUB_TELEMETRY
|
#undef XK2_HUB_TELEMETRY
|
||||||
#endif
|
#endif
|
||||||
@@ -617,7 +626,7 @@
|
|||||||
//protocols using FRSKYD user frames
|
//protocols using FRSKYD user frames
|
||||||
#undef HUB_TELEMETRY
|
#undef HUB_TELEMETRY
|
||||||
#endif
|
#endif
|
||||||
#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(V761_HUB_TELEMETRY) && not defined(SGF22_HUB_TELEMETRY) && not defined(XK2_HUB_TELEMETRY) && not defined(FX_HUB_TELEMETRY) && not defined(KAMTOM_HUB_TELEMETRY) && not defined(YUXIANG_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)
|
#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(V761_HUB_TELEMETRY) && not defined(SGF22_HUB_TELEMETRY) && not defined(XK_HUB_TELEMETRY) && not defined(XK2_HUB_TELEMETRY) && not defined(FX_HUB_TELEMETRY) && not defined(KAMTOM_HUB_TELEMETRY) && not defined(YUXIANG_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)
|
||||||
#undef TELEMETRY
|
#undef TELEMETRY
|
||||||
#undef INVERT_TELEMETRY
|
#undef INVERT_TELEMETRY
|
||||||
#undef MULTI_TELEMETRY
|
#undef MULTI_TELEMETRY
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ Multiprotocol is distributed in the hope that it will be useful,
|
|||||||
#define XK_PAYLOAD_SIZE 16
|
#define XK_PAYLOAD_SIZE 16
|
||||||
#define XK_BIND_COUNT 750 //3sec
|
#define XK_BIND_COUNT 750 //3sec
|
||||||
|
|
||||||
|
enum {
|
||||||
|
XK_DATA,
|
||||||
|
XK_RX,
|
||||||
|
};
|
||||||
|
|
||||||
static uint16_t __attribute__((unused)) XK_convert_channel(uint8_t num)
|
static uint16_t __attribute__((unused)) XK_convert_channel(uint8_t num)
|
||||||
{
|
{
|
||||||
uint16_t val;
|
uint16_t val;
|
||||||
@@ -68,6 +73,8 @@ static void __attribute__((unused)) XK_send_packet()
|
|||||||
memset(packet,0x00,7);
|
memset(packet,0x00,7);
|
||||||
memset(&packet[10],0x00,5);
|
memset(&packet[10],0x00,5);
|
||||||
|
|
||||||
|
if(protocol != PROTO_MOFLY)
|
||||||
|
{
|
||||||
packet[12]=0x40;
|
packet[12]=0x40;
|
||||||
packet[13]=0x40;
|
packet[13]=0x40;
|
||||||
if(IS_BIND_IN_PROGRESS)
|
if(IS_BIND_IN_PROGRESS)
|
||||||
@@ -89,7 +96,7 @@ static void __attribute__((unused)) XK_send_packet()
|
|||||||
|
|
||||||
memset(&packet[4],0x40,3); // Trims
|
memset(&packet[4],0x40,3); // Trims
|
||||||
|
|
||||||
if(Channel_data[CH5] > CHANNEL_MAX_COMMAND)
|
if(CH5_SW)
|
||||||
packet[10] = 0x10; // V-Mode
|
packet[10] = 0x10; // V-Mode
|
||||||
else
|
else
|
||||||
if(Channel_data[CH5] > CHANNEL_MIN_COMMAND)
|
if(Channel_data[CH5] > CHANNEL_MIN_COMMAND)
|
||||||
@@ -106,16 +113,38 @@ static void __attribute__((unused)) XK_send_packet()
|
|||||||
|GET_FLAG(CH12_SW,0x10); // Light
|
|GET_FLAG(CH12_SW,0x10); // Light
|
||||||
//debugln("P1:%02X,P12:%02X",packet[1],packet[12]);
|
//debugln("P1:%02X,P12:%02X",packet[1],packet[12]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
packet[0] = convert_channel_8b(THROTTLE);
|
||||||
|
packet[1] = convert_channel_s8b(RUDDER);
|
||||||
|
packet[2] = convert_channel_s8b(ELEVATOR);
|
||||||
|
packet[3] = convert_channel_s8b(AILERON);
|
||||||
|
memset(&packet[4],0x40,3); // Trims centered
|
||||||
|
//0x00 default MM Mode
|
||||||
|
if(CH5_SW)
|
||||||
|
packet[10] = 0x01; // 6G Mode
|
||||||
|
else
|
||||||
|
if(Channel_data[CH5] > CHANNEL_MIN_COMMAND)
|
||||||
|
packet[10] = 0x02; // 3D-Mode
|
||||||
|
packet[10] |= GET_FLAG(CH6_SW ,0x04); // Low/High rate
|
||||||
|
packet[11] = GET_FLAG(CH7_SW ,0x10) // Back Flip - momentary switch
|
||||||
|
|GET_FLAG(CH8_SW ,0x20) // Left Roll - momentary switch
|
||||||
|
|GET_FLAG(CH9_SW ,0x04) // Right Roll - momentary switch
|
||||||
|
|GET_FLAG(CH10_SW,0x08); // Inverted Flight - latching switch
|
||||||
|
}
|
||||||
|
|
||||||
crc=packet[0];
|
crc=packet[0];
|
||||||
for(uint8_t i=1; i<XK_PAYLOAD_SIZE-1;i++)
|
for(uint8_t i=1; i<XK_PAYLOAD_SIZE-1;i++)
|
||||||
crc+=packet[i];
|
crc+=packet[i];
|
||||||
packet[15]=crc;
|
packet[15]=crc;
|
||||||
|
|
||||||
// debug("C: %02X, P:",hopping_frequency[rf_ch_num]);
|
#if 0
|
||||||
// for(uint8_t i=0; i<XK_PAYLOAD_SIZE; i++)
|
debug("C: %02X, P:",hopping_frequency[rf_ch_num]);
|
||||||
// debug(" %02X",packet[i]);
|
for(uint8_t i=0; i<XK_PAYLOAD_SIZE; i++)
|
||||||
// debugln("");
|
debug(" %02X",packet[i]);
|
||||||
|
debugln("");
|
||||||
|
#endif
|
||||||
|
|
||||||
// Send
|
// Send
|
||||||
XN297_SetPower(); // Set tx_power
|
XN297_SetPower(); // Set tx_power
|
||||||
@@ -128,7 +157,7 @@ const uint8_t PROGMEM XK_bind_hop[XK_RF_BIND_NUM_CHANNELS]= { 0x07, 0x24, 0x3E,
|
|||||||
|
|
||||||
const uint8_t PROGMEM XK_tx_addr[]= { 0xB3, 0x67, 0xE9, 0x98, 0x3A, 0xEC, 0xA6, 0x59, 0xB2, 0x94, 0x2B, 0xA5, 0x37, 0xC5, 0x4A, 0xD3,
|
const uint8_t PROGMEM XK_tx_addr[]= { 0xB3, 0x67, 0xE9, 0x98, 0x3A, 0xEC, 0xA6, 0x59, 0xB2, 0x94, 0x2B, 0xA5, 0x37, 0xC5, 0x4A, 0xD3,
|
||||||
0x49, 0xA6, 0x83, 0xEB, 0x4B, 0xC9, 0x59, 0xD2, 0x65, 0x34, 0x6A, 0xD3, 0x2C, 0x96, 0x2A, 0xA9,
|
0x49, 0xA6, 0x83, 0xEB, 0x4B, 0xC9, 0x59, 0xD2, 0x65, 0x34, 0x6A, 0xD3, 0x2C, 0x96, 0x2A, 0xA9,
|
||||||
0x32, 0xB2, 0xB4, 0x49, 0xD3, 0x37, 0xE9 };
|
0x32, 0xB2, 0xB4, 0x49, 0xD3, 0x37, 0xE9 }; // last one in the table is 0x68 but not reachable
|
||||||
|
|
||||||
const uint8_t PROGMEM XK_hop[]= { 0x47, 0x3A, 0x4C, 0x39, 0x4D, 0x34, 0x4A, 0x3F, 0x45, 0x3E, 0x4B, 0x3D, 0x3B, 0x48, 0x40, 0x49,
|
const uint8_t PROGMEM XK_hop[]= { 0x47, 0x3A, 0x4C, 0x39, 0x4D, 0x34, 0x4A, 0x3F, 0x45, 0x3E, 0x4B, 0x3D, 0x3B, 0x48, 0x40, 0x49,
|
||||||
0x46, 0x3C, 0x43, 0x38, 0x35, 0x42, 0x33, 0x44, 0x4E, 0x37, 0x44, 0x35, 0x37, 0x4E, 0x36, 0x41 };
|
0x46, 0x3C, 0x43, 0x38, 0x35, 0x42, 0x33, 0x44, 0x4E, 0x37, 0x44, 0x35, 0x37, 0x4E, 0x36, 0x41 };
|
||||||
@@ -196,34 +225,102 @@ static void __attribute__((unused)) XK_initialize_txid()
|
|||||||
|
|
||||||
static void __attribute__((unused)) XK_RF_init()
|
static void __attribute__((unused)) XK_RF_init()
|
||||||
{
|
{
|
||||||
XN297_Configure(XN297_CRCEN, XN297_SCRAMBLED, sub_protocol==X450 ? XN297_250K : XN297_1M );
|
XN297_Configure(XN297_CRCEN, XN297_SCRAMBLED, sub_protocol==X450 ? XN297_250K : XN297_1M ); //MoFly equals to X450 here
|
||||||
XN297_SetTXAddr((uint8_t*)"\x68\x94\xA6\xD5\xC3", 5); // Bind address
|
XN297_SetTXAddr((uint8_t*)"\x68\x94\xA6\xD5\xC3", 5); // Bind address
|
||||||
XN297_HoppingCalib(XK_RF_BIND_NUM_CHANNELS+XK_RF_NUM_CHANNELS); // Calibrate all channels
|
XN297_HoppingCalib(XK_RF_BIND_NUM_CHANNELS+XK_RF_NUM_CHANNELS); // Calibrate all channels
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t XK_callback()
|
uint16_t XK_callback()
|
||||||
{
|
{
|
||||||
|
#ifdef XK_HUB_TELEMETRY
|
||||||
|
bool rx = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
switch(phase)
|
||||||
|
{
|
||||||
|
case XK_DATA:
|
||||||
#ifdef MULTI_SYNC
|
#ifdef MULTI_SYNC
|
||||||
telemetry_set_input_sync(XK_PACKET_PERIOD);
|
telemetry_set_input_sync(XK_PACKET_PERIOD);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef XK_HUB_TELEMETRY
|
||||||
|
rx = XN297_IsRX();
|
||||||
|
XN297_SetTxRxMode(TXRX_OFF);
|
||||||
|
#endif
|
||||||
if(bind_counter)
|
if(bind_counter)
|
||||||
if(--bind_counter==0)
|
if(--bind_counter==0)
|
||||||
{
|
{
|
||||||
BIND_DONE;
|
BIND_DONE;
|
||||||
XN297_SetTXAddr(rx_tx_addr, 5); // Normal packets address
|
XN297_SetTXAddr(rx_tx_addr, 5); // Normal packets address
|
||||||
|
#ifdef XK_HUB_TELEMETRY
|
||||||
|
XN297_SetRXAddr(rx_tx_addr, XK_PAYLOAD_SIZE); // Normal packets address
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
XK_send_packet();
|
XK_send_packet();
|
||||||
|
#ifdef XK_HUB_TELEMETRY
|
||||||
|
if(rx)
|
||||||
|
{
|
||||||
|
XN297_ReadPayload(packet_in, XK_PAYLOAD_SIZE);
|
||||||
|
#if 1
|
||||||
|
debug("RX");
|
||||||
|
for(uint8_t i=0; i<XK_PAYLOAD_SIZE; i++)
|
||||||
|
debug(" %02X",packet_in[i]);
|
||||||
|
debugln("");
|
||||||
|
#endif
|
||||||
|
if(memcmp(&packet[7], packet_in, 3) == 0)
|
||||||
|
{//TX_ID ok
|
||||||
|
crc=packet_in[0]+0x68;
|
||||||
|
for(uint8_t i=1; i<XK_PAYLOAD_SIZE-1;i++)
|
||||||
|
crc+=packet_in[i];
|
||||||
|
if(packet_in[15] == crc)
|
||||||
|
{//Checksum ok
|
||||||
|
telemetry_link = 1;
|
||||||
|
v_lipo1 = packet_in[10] ? 137:162; // low voltage 7.1V
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
phase++;
|
||||||
|
return 1350;
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
#ifdef XK_HUB_TELEMETRY
|
||||||
|
default: //XK_RX
|
||||||
|
/*{ // Wait for packet to be sent before switching to receive mode
|
||||||
|
uint16_t start=(uint16_t)micros(), count=0;
|
||||||
|
while ((uint16_t)((uint16_t)micros()-(uint16_t)start) < 500)
|
||||||
|
{
|
||||||
|
if(XN297_IsPacketSent())
|
||||||
|
break;
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
debugln("%d",count);
|
||||||
|
}*/
|
||||||
|
//Switch to RX
|
||||||
|
XN297_SetTxRxMode(TXRX_OFF);
|
||||||
|
XN297_SetTxRxMode(RX_EN);
|
||||||
|
phase = XK_DATA;
|
||||||
|
return XK_PACKET_PERIOD-1350;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
return XK_PACKET_PERIOD;
|
return XK_PACKET_PERIOD;
|
||||||
}
|
}
|
||||||
|
|
||||||
void XK_init()
|
void XK_init()
|
||||||
{
|
{
|
||||||
if(sub_protocol != XK_CARS)
|
if((sub_protocol != XK_CARS && protocol != PROTO_MOFLY) || IS_BIND_IN_PROGRESS)
|
||||||
|
{
|
||||||
|
bind_counter=XK_BIND_COUNT;
|
||||||
BIND_IN_PROGRESS; // Autobind protocol
|
BIND_IN_PROGRESS; // Autobind protocol
|
||||||
|
}
|
||||||
|
else
|
||||||
|
bind_counter=1;
|
||||||
XK_initialize_txid();
|
XK_initialize_txid();
|
||||||
XK_RF_init();
|
XK_RF_init();
|
||||||
hopping_frequency_no = 0;
|
hopping_frequency_no = 0;
|
||||||
bind_counter=XK_BIND_COUNT;
|
phase = XK_DATA;
|
||||||
|
#ifdef XK_HUB_TELEMETRY
|
||||||
|
RX_RSSI = 100; // Dummy value
|
||||||
|
telemetry_lost = 1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -107,6 +107,7 @@
|
|||||||
//#define FORCE_REDPINE_TUNING 0
|
//#define FORCE_REDPINE_TUNING 0
|
||||||
//#define FORCE_FUTABA_TUNING 0
|
//#define FORCE_FUTABA_TUNING 0
|
||||||
//#define FORCE_SKYARTEC_TUNING 0
|
//#define FORCE_SKYARTEC_TUNING 0
|
||||||
|
//#define FORCE_ARES_TUNING 0
|
||||||
|
|
||||||
/** A7105 Fine Frequency Tuning **/
|
/** A7105 Fine Frequency Tuning **/
|
||||||
//This is required in rare cases where some A7105 modules and/or RXs have an inaccurate crystal oscillator.
|
//This is required in rare cases where some A7105 modules and/or RXs have an inaccurate crystal oscillator.
|
||||||
@@ -205,6 +206,7 @@
|
|||||||
#define WK2x01_CYRF6936_INO
|
#define WK2x01_CYRF6936_INO
|
||||||
|
|
||||||
//The protocols below need a CC2500 to be installed
|
//The protocols below need a CC2500 to be installed
|
||||||
|
#define ARES_CC2500_INO
|
||||||
#define CORONA_CC2500_INO
|
#define CORONA_CC2500_INO
|
||||||
#define E016HV2_CC2500_INO
|
#define E016HV2_CC2500_INO
|
||||||
#define ESKY150V2_CC2500_INO
|
#define ESKY150V2_CC2500_INO
|
||||||
@@ -213,11 +215,11 @@
|
|||||||
#define FRSKYV_CC2500_INO
|
#define FRSKYV_CC2500_INO
|
||||||
#define FRSKYX_CC2500_INO //Include FRSKYX2 protocol
|
#define FRSKYX_CC2500_INO //Include FRSKYX2 protocol
|
||||||
#define FRSKY_RX_CC2500_INO
|
#define FRSKY_RX_CC2500_INO
|
||||||
|
#define FUTABA_CC2500_INO
|
||||||
#define HITEC_CC2500_INO
|
#define HITEC_CC2500_INO
|
||||||
#define HOTT_CC2500_INO
|
#define HOTT_CC2500_INO
|
||||||
//#define IKEAANSLUTA_CC2500_INO // This is mostly a "for-fun" kind of a thing, not needed for most users
|
//#define IKEAANSLUTA_CC2500_INO // This is mostly a "for-fun" kind of a thing, not needed for most users
|
||||||
#define SCANNER_CC2500_INO
|
#define SCANNER_CC2500_INO
|
||||||
#define FUTABA_CC2500_INO
|
|
||||||
#define SKYARTEC_CC2500_INO
|
#define SKYARTEC_CC2500_INO
|
||||||
#define REDPINE_CC2500_INO
|
#define REDPINE_CC2500_INO
|
||||||
#define RLINK_CC2500_INO
|
#define RLINK_CC2500_INO
|
||||||
@@ -279,7 +281,7 @@
|
|||||||
#define UDIRC_CCNRF_INO
|
#define UDIRC_CCNRF_INO
|
||||||
#define V911S_CCNRF_INO
|
#define V911S_CCNRF_INO
|
||||||
#define WL91X_CCNRF_INO
|
#define WL91X_CCNRF_INO
|
||||||
#define XK_CCNRF_INO
|
#define XK_CCNRF_INO //Include MoFly protocol
|
||||||
#define XK2_CCNRF_INO
|
#define XK2_CCNRF_INO
|
||||||
|
|
||||||
//The protocols below need a SX1276 to be installed
|
//The protocols below need a SX1276 to be installed
|
||||||
@@ -355,6 +357,7 @@
|
|||||||
#define V761_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
#define V761_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
||||||
#define KAMTOM_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
#define KAMTOM_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
||||||
#define FX_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
#define FX_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
||||||
|
#define XK_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
||||||
#define XK2_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
#define XK2_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
||||||
#define SGF22_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
#define SGF22_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
||||||
#define YUXIANG_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
#define YUXIANG_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
|
||||||
@@ -565,6 +568,8 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
|
|||||||
// - 0x0000ABCD will give to the protocol the channels in the order 1,2,3,4,10,11,12,13 which potentially enables acces to channels not available on your TX. Note A=10,B=11,C=12,D=13,E=14,F=15.
|
// - 0x0000ABCD will give to the protocol the channels in the order 1,2,3,4,10,11,12,13 which potentially enables acces to channels not available on your TX. Note A=10,B=11,C=12,D=13,E=14,F=15.
|
||||||
|
|
||||||
/* Available protocols and associated sub protocols to pick and choose from (Listed in alphabetical order)
|
/* Available protocols and associated sub protocols to pick and choose from (Listed in alphabetical order)
|
||||||
|
PROTO_ARES
|
||||||
|
NONE
|
||||||
PROTO_AFHDS2A
|
PROTO_AFHDS2A
|
||||||
PWM_IBUS
|
PWM_IBUS
|
||||||
PPM_IBUS
|
PPM_IBUS
|
||||||
@@ -785,6 +790,8 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
|
|||||||
PHOENIX
|
PHOENIX
|
||||||
PROTO_MLINK
|
PROTO_MLINK
|
||||||
NONE
|
NONE
|
||||||
|
PROTO_MOFLY
|
||||||
|
NONE
|
||||||
PROTO_MOULDKG
|
PROTO_MOULDKG
|
||||||
MOULDKG_ANALOG4
|
MOULDKG_ANALOG4
|
||||||
MOULDKG_DIGIT4
|
MOULDKG_DIGIT4
|
||||||
@@ -825,7 +832,8 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
|
|||||||
PROTO_Q90C
|
PROTO_Q90C
|
||||||
NONE
|
NONE
|
||||||
PROTO_REALACC
|
PROTO_REALACC
|
||||||
NONE
|
REALACC_R11
|
||||||
|
REALACC_WLV8TX
|
||||||
PROTO_REDPINE
|
PROTO_REDPINE
|
||||||
RED_FAST
|
RED_FAST
|
||||||
RED_SLOW
|
RED_SLOW
|
||||||
@@ -840,10 +848,11 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
|
|||||||
PROTO_SCORPIO
|
PROTO_SCORPIO
|
||||||
NONE
|
NONE
|
||||||
PROTO_SGF22
|
PROTO_SGF22
|
||||||
SGF22
|
SGF22_F22
|
||||||
F22S
|
SGF22_F22S
|
||||||
J20
|
SGF22_J20
|
||||||
CX10
|
SGF22_CX10
|
||||||
|
SGF22_T28
|
||||||
PROTO_SHENQI
|
PROTO_SHENQI
|
||||||
NONE
|
NONE
|
||||||
PROTO_SHENQI2
|
PROTO_SHENQI2
|
||||||
@@ -858,6 +867,7 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
|
|||||||
MR100
|
MR100
|
||||||
V1_4CH
|
V1_4CH
|
||||||
RF_SIM
|
RF_SIM
|
||||||
|
SLT6TX
|
||||||
PROTO_SYMAX
|
PROTO_SYMAX
|
||||||
SYMAX
|
SYMAX
|
||||||
SYMAX5C
|
SYMAX5C
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
//////////////
|
//////////////
|
||||||
// Functions
|
// Functions
|
||||||
#define NRF250K_Init() XN297_Configure(XN297_CRCEN, XN297_SCRAMBLED, XN297_250K)
|
#define NRF250K_Init(X) XN297_Configure(XN297_CRCEN, XN297_SCRAMBLED, XN297_250K, X)
|
||||||
#define NRF250K_HoppingCalib(X) XN297_HoppingCalib(X)
|
#define NRF250K_HoppingCalib(X) XN297_HoppingCalib(X)
|
||||||
#define NRF250K_Hopping(X) XN297_Hopping(X)
|
#define NRF250K_Hopping(X) XN297_Hopping(X)
|
||||||
#define NRF250K_RFChannel(X) XN297_RFChannel(X)
|
#define NRF250K_RFChannel(X) XN297_RFChannel(X)
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ You've upgraded the module but the radio does not display the name of the protoc
|
|||||||
|
|
||||||
Protocol Name|Build|Protocol Number|Sub_Proto 0|Sub_Proto 1|Sub_Proto 2|Sub_Proto 3|Sub_Proto 4|Sub_Proto 5|Sub_Proto 6|Sub_Proto 7|RF Module|Emulation
|
Protocol Name|Build|Protocol Number|Sub_Proto 0|Sub_Proto 1|Sub_Proto 2|Sub_Proto 3|Sub_Proto 4|Sub_Proto 5|Sub_Proto 6|Sub_Proto 7|RF Module|Emulation
|
||||||
---|---|---|---|---|---|---|---|---|---|---|---|---
|
---|---|---|---|---|---|---|---|---|---|---|---|---
|
||||||
|
[Ares](Protocols_Details.md#Ares---108)|AIR|108|||||||||CC2500|
|
||||||
[Assan](Protocols_Details.md#ASSAN---24)|AIR/SFC|24|||||||||NRF24L01|
|
[Assan](Protocols_Details.md#ASSAN---24)|AIR/SFC|24|||||||||NRF24L01|
|
||||||
[Bayang](Protocols_Details.md#BAYANG---14)|AIR/SFC|14|Bayang|H8S3D|X16_AH|IRDRONE|DHD_D4|QX100|||NRF24L01|XN297
|
[Bayang](Protocols_Details.md#BAYANG---14)|AIR/SFC|14|Bayang|H8S3D|X16_AH|IRDRONE|DHD_D4|QX100|||NRF24L01|XN297
|
||||||
[Bayang RX](Protocols_Details.md#BAYANG-RX---59)|AIR/SFC|59|Multi|CPPM|||||||NRF24L01|XN297
|
[Bayang RX](Protocols_Details.md#BAYANG-RX---59)|AIR/SFC|59|Multi|CPPM|||||||NRF24L01|XN297
|
||||||
@@ -125,6 +126,7 @@ CFlie|AIR|38|CFlie||||||||NRF24L01|
|
|||||||
[Losi](Protocols_Details.md#Losi---89)||89|||||||||CYRF6936|
|
[Losi](Protocols_Details.md#Losi---89)||89|||||||||CYRF6936|
|
||||||
[MJXq](Protocols_Details.md#MJXQ---18)||18|WLH08|X600|X800|H26D|E010*|H26WH|PHOENIX*||NRF24L01|XN297
|
[MJXq](Protocols_Details.md#MJXQ---18)||18|WLH08|X600|X800|H26D|E010*|H26WH|PHOENIX*||NRF24L01|XN297
|
||||||
[MLINK](Protocols_Details.md#MLINK---78)||78|||||||||CYRF6936|
|
[MLINK](Protocols_Details.md#MLINK---78)||78|||||||||CYRF6936|
|
||||||
|
[MoFly](Protocols_Details.md#MoFly---109)||109|||||||||NRF24L01&CC2500|XN297
|
||||||
[MouldKg](Protocols_Details.md#mouldkg---90)||90|A4444|D4444|A664||||||NRF24L01|XN297
|
[MouldKg](Protocols_Details.md#mouldkg---90)||90|A4444|D4444|A664||||||NRF24L01|XN297
|
||||||
[MT99xx](Protocols_Details.md#MT99XX---17)||17|MT|H7|YZ|LS|FY805|A180|DRAGON|F949G|NRF24L01|XN297
|
[MT99xx](Protocols_Details.md#MT99XX---17)||17|MT|H7|YZ|LS|FY805|A180|DRAGON|F949G|NRF24L01|XN297
|
||||||
[MT99xx2](Protocols_Details.md#MT99XX2---92)||92|PA18|SU35|||||||NRF24L01|XN297
|
[MT99xx2](Protocols_Details.md#MT99XX2---92)||92|PA18|SU35|||||||NRF24L01|XN297
|
||||||
@@ -138,15 +140,15 @@ CFlie|AIR|38|CFlie||||||||NRF24L01|
|
|||||||
[Q303](Protocols_Details.md#Q303---31)||31|Q303|CX35|CX10D|CX10WD|||||NRF24L01|XN297
|
[Q303](Protocols_Details.md#Q303---31)||31|Q303|CX35|CX10D|CX10WD|||||NRF24L01|XN297
|
||||||
[Q90C](Protocols_Details.md#Q90C---72)||72|Q90C*||||||||NRF24L01|XN297
|
[Q90C](Protocols_Details.md#Q90C---72)||72|Q90C*||||||||NRF24L01|XN297
|
||||||
[RadioLink](Protocols_Details.md#RadioLink---74)||74|Surface|Air|DumboRC|RC4G|Dumbo_P||||CC2500|
|
[RadioLink](Protocols_Details.md#RadioLink---74)||74|Surface|Air|DumboRC|RC4G|Dumbo_P||||CC2500|
|
||||||
[Realacc](Protocols_Details.md#Realacc---76)||76|R11|WL-V8Tx|||||||NRF24L01|
|
[Realacc](Protocols_Details.md#Realacc---76)||76|R11|WLV8TX|||||||NRF24L01|
|
||||||
[Redpine](Protocols_Details.md#Redpine---50)||50|FAST|SLOW|||||||NRF24L01|XN297
|
[Redpine](Protocols_Details.md#Redpine---50)||50|FAST|SLOW|||||||NRF24L01|XN297
|
||||||
[Scanner](Protocols_Details.md#Scanner---54)||54|||||||||CC2500|
|
[Scanner](Protocols_Details.md#Scanner---54)||54|||||||||CC2500|
|
||||||
[Scorpio](Protocols_Details.md#Scorpio---94)||94|||||||||CYRF6936|
|
[Scorpio](Protocols_Details.md#Scorpio---94)||94|||||||||CYRF6936|
|
||||||
[SGF22](Protocols_Details.md#SGF22---97)||97|F22|F22S|J20|CX10|||||NRF24L01|XN297
|
[SGF22](Protocols_Details.md#SGF22---97)||97|F22|F22S|J20|CX10|T28||||NRF24L01|XN297
|
||||||
[Shenqi](Protocols_Details.md#Shenqi---19)||19|Shenqi||||||||NRF24L01|LT8900
|
[Shenqi](Protocols_Details.md#Shenqi---19)||19|Shenqi||||||||NRF24L01|LT8900
|
||||||
[Shenqi2](Protocols_Details.md#Shenqi2---105)||105|Shenqi2||||||||NRF24L01|XN297
|
[Shenqi2](Protocols_Details.md#Shenqi2---105)||105|Shenqi2||||||||NRF24L01|XN297
|
||||||
[Skyartec](Protocols_Details.md#Skyartec---68)||68|||||||||CC2500|CC2500
|
[Skyartec](Protocols_Details.md#Skyartec---68)||68|||||||||CC2500|CC2500
|
||||||
[SLT](Protocols_Details.md#SLT---11)||11|SLT_V1|SLT_V2|Q100|Q200|MR100|V1_4CH|RF_SIM||NRF24L01|CC2500
|
[SLT](Protocols_Details.md#SLT---11)||11|SLT_V1|SLT_V2|Q100|Q200|MR100|V1_4CH|RF_SIM|SLT6TX|NRF24L01|CC2500
|
||||||
[SymaX](Protocols_Details.md#Symax---10)||10|SYMAX|SYMAX5C|||||||NRF24L01|
|
[SymaX](Protocols_Details.md#Symax---10)||10|SYMAX|SYMAX5C|||||||NRF24L01|
|
||||||
[Traxxas](Protocols_Details.md#Traxxas---43)||43|TQ2|TQ1|||||||CYRF6936|
|
[Traxxas](Protocols_Details.md#Traxxas---43)||43|TQ2|TQ1|||||||CYRF6936|
|
||||||
[V2x2](Protocols_Details.md#V2X2---5)||5|V2x2|JXD506|MR101||||||NRF24L01|
|
[V2x2](Protocols_Details.md#V2X2---5)||5|V2x2|JXD506|MR101||||||NRF24L01|
|
||||||
@@ -158,7 +160,7 @@ CFlie|AIR|38|CFlie||||||||NRF24L01|
|
|||||||
[WL91X](Protocols_Details.md#WL91X---106)||106|||||||||NRF24L01&CC2500|XN297
|
[WL91X](Protocols_Details.md#WL91X---106)||106|||||||||NRF24L01&CC2500|XN297
|
||||||
[WPL](Protocols_Details.md#WPL---107)||107|||||||||NRF24L01|XN297
|
[WPL](Protocols_Details.md#WPL---107)||107|||||||||NRF24L01|XN297
|
||||||
[XERALL](Protocols_Details.md#XERALL---91)||91|Tank||||||||NRF24L01|XN297
|
[XERALL](Protocols_Details.md#XERALL---91)||91|Tank||||||||NRF24L01|XN297
|
||||||
[XK](Protocols_Details.md#XK---62)||62|X450|X420|Cars||||||NRF24L01&CC2500|XN297
|
[XK](Protocols_Details.md#XK---62)||62|X450|X420|Cars|MoFly|||||NRF24L01&CC2500|XN297
|
||||||
[XK2](Protocols_Details.md#XK2---99)||99|X4|P10|||||||NRF24L01&CC2500|XN297
|
[XK2](Protocols_Details.md#XK2---99)||99|X4|P10|||||||NRF24L01&CC2500|XN297
|
||||||
[YD717](Protocols_Details.md#YD717---8)||8|YD717|SKYWLKR|SYMAX4|XINXUN|NIHUI||||NRF24L01|
|
[YD717](Protocols_Details.md#YD717---8)||8|YD717|SKYWLKR|SYMAX4|XINXUN|NIHUI||||NRF24L01|
|
||||||
[YuXiang](Protocols_Details.md#YuXiang---100)||100|||||||||NRF24L01|XN297
|
[YuXiang](Protocols_Details.md#YuXiang---100)||100|||||||||NRF24L01|XN297
|
||||||
@@ -237,21 +239,21 @@ Option is used to change the servo refresh rate. A value of 0 gives 50Hz (min),
|
|||||||
### Sub_protocol PWM_IBUS - *0*
|
### Sub_protocol PWM_IBUS - *0*
|
||||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14|CH15|CH16|CH17
|
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14|CH15|CH16|CH17
|
||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---
|
||||||
A|E|T|R|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14CH15|CH16|LQI
|
A|E|T|R|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14|CH15|CH16|LQI
|
||||||
|
|
||||||
RX output will match the Flysky standard AETR.
|
RX output will match the Flysky standard AETR.
|
||||||
|
|
||||||
### Sub_protocol PPM_IBUS - *1*
|
### Sub_protocol PPM_IBUS - *1*
|
||||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14|CH15|CH16|CH17
|
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14|CH15|CH16|CH17
|
||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---
|
||||||
A|E|T|R|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14CH15|CH16|LQI
|
A|E|T|R|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14|CH15|CH16|LQI
|
||||||
|
|
||||||
RX output will match the Flysky standard AETR.
|
RX output will match the Flysky standard AETR.
|
||||||
|
|
||||||
### Sub_protocol PWM_SBUS - *2*
|
### Sub_protocol PWM_SBUS - *2*
|
||||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14|CH15|CH16|CH17
|
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14|CH15|CH16|CH17
|
||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---
|
||||||
A|E|T|R|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14CH15|CH16|LQI
|
A|E|T|R|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14|CH15|CH16|LQI
|
||||||
|
|
||||||
RX output will match the Flysky standard AETR.
|
RX output will match the Flysky standard AETR.
|
||||||
|
|
||||||
@@ -761,6 +763,24 @@ CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
|
|||||||
***
|
***
|
||||||
# CC2500 RF Module
|
# CC2500 RF Module
|
||||||
|
|
||||||
|
## Ares - *108*
|
||||||
|
Models: ARES Gamma 370, P-51D Mustang 350, RTF models with 6HPA-Tx and AZS12006-Rx (6 channel).
|
||||||
|
|
||||||
|
Autobind protocol:
|
||||||
|
- to bind, power on the TX first
|
||||||
|
- then power on the receiver - LED slow flash
|
||||||
|
- press receiver bind button - LED faster flash
|
||||||
|
- receiver LED will flash quickly (15 seconds) when bound LED turns solid
|
||||||
|
|
||||||
|
Receiver numbers (0-63) available for model match, MPM global ID used for unique module identifier. Changing the TX module or RX number will require re-binding the receiver.
|
||||||
|
|
||||||
|
Option for this protocol corresponds to fine frequency tuning. This value is different for each Module and **must** be accurate otherwise the link will not be stable.
|
||||||
|
Check the [Frequency Tuning page](/docs/Frequency_Tuning.md) to determine it.
|
||||||
|
|
||||||
|
CH1|CH2|CH3|CH4|CH5|CH6
|
||||||
|
---|---|---|---|---|---
|
||||||
|
CH1|CH2|CH3|CH4|CH5|CH6
|
||||||
|
|
||||||
## CORONA - *37*
|
## CORONA - *37*
|
||||||
Models: Corona 2.4GHz FSS and DSSS receivers.
|
Models: Corona 2.4GHz FSS and DSSS receivers.
|
||||||
|
|
||||||
@@ -792,6 +812,8 @@ To bind V2 RXs you must follow the below procedure (original):
|
|||||||
### Sub_protocol FD_V3 - *2*
|
### Sub_protocol FD_V3 - *2*
|
||||||
FlyDream RXs like IS-4R and IS-4R0
|
FlyDream RXs like IS-4R and IS-4R0
|
||||||
|
|
||||||
|
Protronik (PTR-6A) RXs like R8X: you need to initiate binding on the receiver, then on the transmitter, and finally press the bind button on the receiver.
|
||||||
|
|
||||||
## E016HV2 - *80*
|
## E016HV2 - *80*
|
||||||
Models: E016H v2
|
Models: E016H v2
|
||||||
|
|
||||||
@@ -1236,6 +1258,19 @@ 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.
|
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.
|
||||||
|
|
||||||
|
## MoFly - *109*
|
||||||
|
Models: MoFly planes MF-X7, P-51D, MF-A84 and Ki-84
|
||||||
|
|
||||||
|
If a CC2500 is installed it will be used for this sub protocol. Option in this case is used for fine frequency tuning like any CC2500 protocols so check the [Frequency Tuning page](/docs/Frequency_Tuning.md).
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10
|
||||||
|
---|---|---|---|---|---|---|---|---|----
|
||||||
|
A|E|T|R|Flight_modes|Rate_L/H|Back_Flip|Left_Roll|Right_Roll|Inverted
|
||||||
|
|
||||||
|
Flight_modes: -100%=MM-Mode, 0%=3D-Mode, +100%=6G-Mode. CH7-CH9 are momentary switches. CH10 is a toggle switch.
|
||||||
|
|
||||||
## MT99XX - *17*
|
## MT99XX - *17*
|
||||||
Autobind protocol
|
Autobind protocol
|
||||||
|
|
||||||
@@ -1532,6 +1567,16 @@ Please save radio-profile with a new name without setting reset-button in RF8. T
|
|||||||
|
|
||||||
Find the [Reset21] section and change Input=INT:-1 to Input=INT:9
|
Find the [Reset21] section and change Input=INT:-1 to Input=INT:9
|
||||||
|
|
||||||
|
### Sub_protocol SLT6TX - *7*
|
||||||
|
Models: Blade Revolution 90 FP helicopter (SLT6 transmitter)
|
||||||
|
|
||||||
|
CH1|CH2|CH3|CH4|CH5|CH6
|
||||||
|
---|---|---|---|---|---
|
||||||
|
A|E|T|R|FMODE|PANIC
|
||||||
|
|
||||||
|
FMODE: flight mode switch (3-position)
|
||||||
|
|
||||||
|
PANIC: panic/recovery button
|
||||||
|
|
||||||
## V911S - *46*
|
## V911S - *46*
|
||||||
|
|
||||||
@@ -1576,7 +1621,7 @@ CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10
|
|||||||
---|---|---|---|---|---|---|---|---|----
|
---|---|---|---|---|---|---|---|---|----
|
||||||
A|E|T|R|Flight_modes|Take_off|Emerg stop|3D/6G|Picture|Video
|
A|E|T|R|Flight_modes|Take_off|Emerg stop|3D/6G|Picture|Video
|
||||||
|
|
||||||
Flight_modes: -100%=M-Mode, 0%=6G-Mode, +100%=V-Mode. CH6-CH10 are mementary switches.
|
Flight_modes: -100%=M-Mode, 0%=6G-Mode, +100%=V-Mode. CH6-CH10 are momentary switches.
|
||||||
|
|
||||||
### Sub_protocol X420 - *1*
|
### Sub_protocol X420 - *1*
|
||||||
Models: XK X420/X520 (TX=X4)
|
Models: XK X420/X520 (TX=X4)
|
||||||
@@ -1585,7 +1630,7 @@ CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10
|
|||||||
---|---|---|---|---|---|---|---|---|----
|
---|---|---|---|---|---|---|---|---|----
|
||||||
A|E|T|R|Flight_modes|Take_off|Emerg stop|3D/6G|Picture|Video
|
A|E|T|R|Flight_modes|Take_off|Emerg stop|3D/6G|Picture|Video
|
||||||
|
|
||||||
Flight_modes: -100%=M-Mode, 0%=6G-Mode, +100%=V-Mode. CH6-CH10 are mementary switches.
|
Flight_modes: -100%=M-Mode, 0%=6G-Mode, +100%=V-Mode. CH6-CH10 are momentary switches.
|
||||||
|
|
||||||
Model: Tiger Drone 1400782
|
Model: Tiger Drone 1400782
|
||||||
|
|
||||||
@@ -1901,7 +1946,7 @@ FX9630 and FX9603 Gyro: -100%=6G small throw, 0%=6G large throw, +100%=3D
|
|||||||
QIDI-550 Gyro: -100%=3D, 0%=6G, +100%=Torque
|
QIDI-550 Gyro: -100%=3D, 0%=6G, +100%=Torque
|
||||||
|
|
||||||
### Sub_protocol Q560 - *3*
|
### Sub_protocol Q560 - *3*
|
||||||
Model: QIDI-560, QIDI-580 (Cirrus SR22)
|
Model: QIDI-560, QIDI-580, QIDI-590
|
||||||
|
|
||||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7
|
CH1|CH2|CH3|CH4|CH5|CH6|CH7
|
||||||
---|---|---|---|---|---|---
|
---|---|---|---|---|---|---
|
||||||
@@ -2313,7 +2358,7 @@ CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11
|
|||||||
---|---|---|---|---|---|---|---|---|----|----
|
---|---|---|---|---|---|---|---|---|----|----
|
||||||
A|E|T|R|FLIP|LIGHT|CALIB|HLESS|RTH|THR_CUT|ROTATE
|
A|E|T|R|FLIP|LIGHT|CALIB|HLESS|RTH|THR_CUT|ROTATE
|
||||||
|
|
||||||
### Sub_protocol WL-V8Tx - *1*
|
### Sub_protocol WLV8TX - *1*
|
||||||
|
|
||||||
Models: WLtoys 284019A, 284191, Cars using V8 Transmitter
|
Models: WLtoys 284019A, 284191, Cars using V8 Transmitter
|
||||||
|
|
||||||
@@ -2336,9 +2381,9 @@ ST TRIM: -100% Left, +100% Right, variable/shouldn't be needed? CH1 trim on stee
|
|||||||
## SGF22 - *97*
|
## SGF22 - *97*
|
||||||
Autobind protocol
|
Autobind protocol
|
||||||
|
|
||||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
|
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13
|
||||||
---|---|---|---|---|---|---|---|---|---|---|---
|
---|---|---|---|---|---|---|---|---|---|---|---|---
|
||||||
A|E|T|R|MODE|FLIP|LIGHT|PHOTO|VIDEO|TRIMRESET|BAL|BALHIG
|
A|E|T|R|MODE|FLIP|LIGHT|PHOTO|VIDEO|TRIMRESET|BAL|BALHIG|RTH_SET
|
||||||
|
|
||||||
Telemetry is supported. The plane sends a battery status of good->empty which is visible in A1 (good=13.2V->empty=0V) and RSSI gets a dummy value of 100.
|
Telemetry is supported. The plane sends a battery status of good->empty which is visible in A1 (good=13.2V->empty=0V) and RSSI gets a dummy value of 100.
|
||||||
|
|
||||||
@@ -2359,14 +2404,27 @@ Mode -100% = 3D, 0% = 6G
|
|||||||
### Sub_protocol J20
|
### Sub_protocol J20
|
||||||
Model: KF700 J20
|
Model: KF700 J20
|
||||||
|
|
||||||
Mode -100% = Gyro off, 0% = Horizontal, 100% = Vertical. CH8 - Invert, CH10 - Fix Height (Altitude hold)
|
Mode: -100% = Gyro off, 0% = Horizontal, 100% = Vertical. CH8 - Invert, CH10 - Fix Height (Altitude hold)
|
||||||
|
|
||||||
### Sub_protocol CX10
|
### Sub_protocol CX10
|
||||||
Model: Cheerson CX-10 with red PCB
|
Model: Cheerson CX-10 with red PCB
|
||||||
|
|
||||||
**Only 2 IDs available**, use RX num to cycle through them.
|
**Only 2 IDs available**, use RX num to cycle through them.
|
||||||
|
|
||||||
Mode -100% = Low, 0% = Medium, 100% = High
|
Mode: -100% = Low, 0% = Medium, 100% = High
|
||||||
|
|
||||||
|
### Sub_protocol T28
|
||||||
|
Model: FMS T28
|
||||||
|
|
||||||
|
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13
|
||||||
|
---|---|---|---|---|---|---|---|---|---|---|---|---
|
||||||
|
A|E|T|R|MODE|STUNT|LIGHT|INVERT|RTH|-|-|-|RTH_SET
|
||||||
|
|
||||||
|
Mode: -100% = Gyro off, 0% = Stabilized, 100% = Optimized
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
- CH6/CH9/CH13 (STUNT, RTH, RTH Set) are NOT required to be bound, or used to fly the plane.
|
||||||
|
- CH9 (RTH) WILL function without CH13 (RTH Set) bound/used.
|
||||||
|
|
||||||
## Shenqi - *19*
|
## Shenqi - *19*
|
||||||
Autobind protocol
|
Autobind protocol
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ If you like this project and want to support further development please consider
|
|||||||
|
|
||||||
Multiprotocol downloads: <img src=https://img.shields.io/github/downloads/pascallanger/DIY-Multiprotocol-TX-Module/total.svg>
|
Multiprotocol downloads: <img src=https://img.shields.io/github/downloads/pascallanger/DIY-Multiprotocol-TX-Module/total.svg>
|
||||||
|
|
||||||
Current Multiprotocol code check status: [<img src=https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/workflows/CI/badge.svg>](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/actions). Download the latest **test** build [here](https://downloads.multi-module.org/latest-test/).
|
Current Multiprotocol code check status: [](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/actions). Download the latest **test** build [here](https://downloads.multi-module.org/latest-test/).
|
||||||
|
|
||||||
Current Multiprotocol boards check status: [](https://travis-ci.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards)
|
Current Multiprotocol boards check status: [](https://travis-ci.com/pascallanger/DIY-Multiprotocol-TX-Module-Boards)
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ mv build/Multiprotocol.ino.bin ./binaries/mm-avr-usbasp-aetr-A7105-inv-v$MULTI_V
|
|||||||
printf "\e[33;1mBuilding mm-avr-usbasp-aetr-CC2500-inv-v$MULTI_VERSION.bin\e[0m\n";
|
printf "\e[33;1mBuilding mm-avr-usbasp-aetr-CC2500-inv-v$MULTI_VERSION.bin\e[0m\n";
|
||||||
opt_disable $ALL_PROTOCOLS;
|
opt_disable $ALL_PROTOCOLS;
|
||||||
opt_enable $CC2500_PROTOCOLS;
|
opt_enable $CC2500_PROTOCOLS;
|
||||||
opt_disable HITEC_CC2500_INO REDPINE_CC2500_INO OMP_CC2500_INO SKYARTEC_CC2500_INO SCANNER_CC2500_INO FRSKYL_CC2500_INO;
|
opt_disable HITEC_CC2500_INO REDPINE_CC2500_INO OMP_CC2500_INO SKYARTEC_CC2500_INO SCANNER_CC2500_INO FRSKYL_CC2500_INO ARES_CC2500_INO;
|
||||||
buildMulti;
|
buildMulti;
|
||||||
exitcode=$((exitcode+$?));
|
exitcode=$((exitcode+$?));
|
||||||
mv build/Multiprotocol.ino.bin ./binaries/mm-avr-usbasp-aetr-CC2500-inv-v$MULTI_VERSION.bin;
|
mv build/Multiprotocol.ino.bin ./binaries/mm-avr-usbasp-aetr-CC2500-inv-v$MULTI_VERSION.bin;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ mv build/Multiprotocol.ino.bin ./binaries/mm-avr-txflash-aetr-A7105-inv-v$MULTI_
|
|||||||
printf "\e[33;1mBuilding mm-avr-txflash-aetr-CC2500-inv-v$MULTI_VERSION.bin\e[0m\n";
|
printf "\e[33;1mBuilding mm-avr-txflash-aetr-CC2500-inv-v$MULTI_VERSION.bin\e[0m\n";
|
||||||
opt_disable $ALL_PROTOCOLS;
|
opt_disable $ALL_PROTOCOLS;
|
||||||
opt_enable $CC2500_PROTOCOLS;
|
opt_enable $CC2500_PROTOCOLS;
|
||||||
opt_disable HITEC_CC2500_INO REDPINE_CC2500_INO OMP_CC2500_INO SKYARTEC_CC2500_INO SCANNER_CC2500_INO FRSKYL_CC2500_INO RLINK_CC2500_INO;
|
opt_disable HITEC_CC2500_INO REDPINE_CC2500_INO OMP_CC2500_INO SKYARTEC_CC2500_INO SCANNER_CC2500_INO FRSKYL_CC2500_INO RLINK_CC2500_INO ARES_CC2500_INO;
|
||||||
buildMulti;
|
buildMulti;
|
||||||
exitcode=$((exitcode+$?));
|
exitcode=$((exitcode+$?));
|
||||||
mv build/Multiprotocol.ino.bin ./binaries/mm-avr-txflash-aetr-CC2500-inv-v$MULTI_VERSION.bin;
|
mv build/Multiprotocol.ino.bin ./binaries/mm-avr-txflash-aetr-CC2500-inv-v$MULTI_VERSION.bin;
|
||||||
|
|||||||
Reference in New Issue
Block a user