mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 16:38:12 +00:00
Compare commits
15 Commits
406f5feca5
...
eaf71c2f49
Author | SHA1 | Date | |
---|---|---|---|
|
eaf71c2f49 | ||
|
546a962d96 | ||
|
fd150fa109 | ||
|
9b66711052 | ||
|
550754c7f9 | ||
|
729fdd4719 | ||
|
2713b18099 | ||
|
5b5e95066a | ||
|
b1f8560509 | ||
|
50c18311c9 | ||
|
95746f80a1 | ||
|
bb7685e7a5 | ||
|
a44126583e | ||
|
7fbca99bf3 | ||
|
8db90fb6fc |
@ -171,9 +171,11 @@
|
||||
11,3,SLT,Q200,0,Rates,n-a,CH7,CH8,Mode,VidOn,VidOff,Calib
|
||||
11,4,SLT,MR100,0,Rates,n-a,CH7,CH8,Mode,Flip,Video,Pict
|
||||
11,5,SLT,V1_4CH,0
|
||||
11,6,SLT,RF_SIM,0,CH5,CH6,CH7,CH8,CH9,CH10
|
||||
10,0,Symax,Std,1,Flip,Rates,Pict,Video,HLess
|
||||
10,1,Symax,X5C,1,Flip,Rates,Pict,Video,HLess
|
||||
43,0,Traxxas,TQ,0
|
||||
43,0,Traxxas,TQ2,0
|
||||
43,1,Traxxas,TQ1,0
|
||||
5,0,V2x2,Std,1,Flip,Light,Pict,Video,HLess,CalX,CalY
|
||||
5,1,V2x2,JXD506,1,Flip,Light,Pict,Video,HLess,StaSto,Emerg,Cam_UD
|
||||
48,0,V761,3CH,0,Gyro,Calib,Flip,RtnAct,Rtn,Beep
|
||||
@ -191,7 +193,7 @@
|
||||
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,2,XK,Cars,0,FMode,TakeOf,Emerg,3D_6G,Pict,Video,Flip,Light
|
||||
99,0,XK2,X4,0,Rate,Mode,Hover
|
||||
99,0,XK2,X4,0,Rate,Mode,Hover,Light
|
||||
8,0,YD717,Std,1,Flip,Light,Pict,Video,HLess
|
||||
8,1,YD717,SkyWlkr,1,Flip,Light,Pict,Video,HLess
|
||||
8,2,YD717,Simax4,1,Flip,Light,Pict,Video,HLess
|
||||
@ -213,6 +215,7 @@
|
||||
90,1,MouldKg,Digit,0
|
||||
91,0,Xerall,Tank,0,FlTa,TakLan,Rate,HLess,Photo,Video,TrimR,TrimE,TrimA
|
||||
92,0,MT99xx2,PA18,0,MODE,FLIP,RTH
|
||||
92,1,MT99xx2,SU35,0,Mode,LED,LED_FH,Invert,Rate
|
||||
93,0,Kyosho2,KT-17,0
|
||||
94,0,Scorpio
|
||||
95,0,Bluefly,HP100,0,CH5,CH6,CH7,CH8
|
||||
@ -221,4 +224,4 @@
|
||||
97,1,SGF22,F22S,1,Mode,Flip,LED,Pict,Video,TrRes
|
||||
61,0,EazyRC
|
||||
98,0,Kyosho3,ASF,0
|
||||
100,0,YuXiang,Std,0,Lock,Rate,Land,AltHol,Manual,Flip,Mode,Pitch
|
||||
100,0,YuXiang,Std,0,Lock,Rate,Land,Manual,Flip,Mode,Pitch
|
||||
|
@ -12,7 +12,7 @@
|
||||
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 MT99xx, Eachine H7, Yi Zhan i6S and LS114/124
|
||||
// compatible with MT99xx, Eachine H7, Yi Zhan i6S, LS114/124, QF009 Su35
|
||||
// Last sync with Goebish mt99xx_nrf24l01.c dated 2016-01-29
|
||||
|
||||
#if defined(MT99XX_CCNRF_INO)
|
||||
@ -96,6 +96,16 @@ enum{
|
||||
FLAG_PA18_FLIP = 0x80,
|
||||
};
|
||||
|
||||
enum{
|
||||
// flags going to packet[6] (QF009 Su35)
|
||||
FLAG_SU35_6G = 0x00,
|
||||
FLAG_SU35_3D = 0x40,
|
||||
FLAG_SU35_HIRATE = 0x01,
|
||||
FLAG_SU35_LED = 0x02,
|
||||
FLAG_SU35_FLASH = 0x04,
|
||||
FLAG_SU35_INVERT = 0x08,
|
||||
};
|
||||
|
||||
const uint8_t h7_mys_byte[] = {
|
||||
0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 0x04, 0x14,
|
||||
0x05, 0x15, 0x06, 0x16, 0x07, 0x17, 0x00, 0x10
|
||||
@ -271,6 +281,14 @@ static void __attribute__((unused)) MT99XX_send_packet()
|
||||
if(hopping_frequency_no == 0)
|
||||
packet[7] ^= 0x40;
|
||||
break;
|
||||
case SU35+8:
|
||||
packet[6] = FLAG_SU35_6G
|
||||
| GET_FLAG( CH5_SW, FLAG_SU35_3D )
|
||||
| GET_FLAG( !CH6_SW, FLAG_SU35_LED )
|
||||
| GET_FLAG( CH7_SW, FLAG_SU35_FLASH )
|
||||
| GET_FLAG( CH8_SW, FLAG_SU35_INVERT )
|
||||
| GET_FLAG( CH9_SW, FLAG_SU35_HIRATE );
|
||||
break;
|
||||
}
|
||||
uint8_t result=crc8;
|
||||
for(uint8_t i=0; i<8; i++)
|
||||
|
@ -8,7 +8,7 @@
|
||||
8,YD717,YD717,SKYWLKR,SYMAX4,XINXUN,NIHUI
|
||||
9,KN,WLTOYS,FEILUN
|
||||
10,SymaX,SYMAX,SYMAX5C
|
||||
11,SLT,SLT_V1,SLT_V2,Q100,Q200,MR100,V1_4CH
|
||||
11,SLT,SLT_V1,SLT_V2,Q100,Q200,MR100,V1_4CH,RF_SIM
|
||||
12,CX10,GREEN,BLUE,DM007,---,J3015_1,J3015_2,MK33041
|
||||
13,CG023,CG023,YD829
|
||||
14,Bayang,Bayang,H8S3D,X16_AH,IRDRONE,DHD_D4,QX100
|
||||
@ -88,7 +88,7 @@
|
||||
89,Losi
|
||||
90,MouldKg,Analog,Digit
|
||||
91,Xerall
|
||||
92,MT99xx,PA18
|
||||
92,MT99xx,PA18,SU35
|
||||
93,Kyosho2,KT-17
|
||||
94,Scorpio
|
||||
95,BlueFly
|
||||
|
@ -132,12 +132,12 @@ 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_KN[] = "\x06""WLtoys""FeiLun";
|
||||
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";
|
||||
const char STR_SUBTYPE_SLT[] = "\x06""V1_6ch""V2_8ch""Q100\0 ""Q200\0 ""MR100\0""V1_4ch""RF_SIM";
|
||||
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_BAYANG[] = "\x07""Std\0 ""H8S3D\0 ""X16 AH\0""IRDrone""DHD D4\0""QX100\0 ";
|
||||
const char STR_SUBTYPE_MT99[] = "\x06""MT99\0 ""H7\0 ""YZ\0 ""LS\0 ""FY805\0""A180\0 ""Dragon""F949G\0";
|
||||
const char STR_SUBTYPE_MT992[] = "\x04""PA18";
|
||||
const char STR_SUBTYPE_MT992[] = "\x04""PA18""SU35";
|
||||
const char STR_SUBTYPE_MJXQ[] = "\x07""WLH08\0 ""X600\0 ""X800\0 ""H26D\0 ""E010\0 ""H26WH\0 ""Phoenix";
|
||||
const char STR_SUBTYPE_FY326[] = "\x05""Std\0 ""FY319";
|
||||
const char STR_SUBTYPE_HONTAI[] = "\x07""Std\0 ""JJRC X1""X5C1\0 ""FQ_951";
|
||||
@ -414,7 +414,7 @@ const mm_protocol_definition multi_protocols[] = {
|
||||
{PROTO_MT99XX, STR_MT99XX, STR_SUBTYPE_MT99, 8, OPTION_NONE, 0, 0, SW_NRF, MT99XX_init, MT99XX_callback },
|
||||
#endif
|
||||
#if defined(MT99XX_CCNRF_INO)
|
||||
{PROTO_MT99XX2, STR_MT99XX2, STR_SUBTYPE_MT992, 1, OPTION_NONE, 0, 0, SW_NRF, MT99XX_init, MT99XX_callback },
|
||||
{PROTO_MT99XX2, STR_MT99XX2, STR_SUBTYPE_MT992, 2, OPTION_NONE, 0, 0, SW_NRF, MT99XX_init, MT99XX_callback },
|
||||
#endif
|
||||
#if defined(NCC1701_NRF24L01_INO)
|
||||
{PROTO_NCC1701, STR_NCC1701, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, NCC_init, NCC_callback },
|
||||
@ -465,7 +465,7 @@ const mm_protocol_definition multi_protocols[] = {
|
||||
{PROTO_SKYARTEC, STR_SKYARTEC, NO_SUBTYPE, 0, OPTION_RFTUNE, 0, 1, SW_CC2500, SKYARTEC_init, SKYARTEC_callback },
|
||||
#endif
|
||||
#if defined(SLT_CCNRF_INO)
|
||||
{PROTO_SLT, STR_SLT, STR_SUBTYPE_SLT, 6, OPTION_RFTUNE, 0, 1, SW_NRF, SLT_init, SLT_callback },
|
||||
{PROTO_SLT, STR_SLT, STR_SUBTYPE_SLT, 7, OPTION_RFTUNE, 0, 1, SW_NRF, SLT_init, SLT_callback },
|
||||
#endif
|
||||
#if defined(SYMAX_NRF24L01_INO)
|
||||
{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_MINOR 3
|
||||
#define VERSION_REVISION 4
|
||||
#define VERSION_PATCH_LEVEL 15
|
||||
#define VERSION_PATCH_LEVEL 20
|
||||
|
||||
#define MODE_SERIAL 0
|
||||
|
||||
@ -209,6 +209,7 @@ enum SLT
|
||||
Q200 = 3,
|
||||
MR100 = 4,
|
||||
SLT_V1_4 = 5,
|
||||
RF_SIM = 6,
|
||||
};
|
||||
enum CX10
|
||||
{
|
||||
@ -256,6 +257,7 @@ enum MT99XX
|
||||
enum MT99XX2
|
||||
{
|
||||
PA18 = 0,
|
||||
SU35 = 1,
|
||||
};
|
||||
enum MJXQ
|
||||
{
|
||||
@ -1110,6 +1112,8 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
|
||||
Q100 2
|
||||
Q200 3
|
||||
MR100 4
|
||||
SLT_V1_4CH 5
|
||||
RF_SIM 6
|
||||
sub_protocol==E01X
|
||||
E012 0
|
||||
E015 1
|
||||
|
@ -137,7 +137,7 @@ static void __attribute__((unused)) SLT_build_packet()
|
||||
for (uint8_t i = 0; i < 4; ++i)
|
||||
{
|
||||
uint16_t v = convert_channel_10b(sub_protocol != SLT_V1_4 ? CH_AETR[i] : i, false);
|
||||
if(sub_protocol>SLT_V2 && (i==CH2 || i==CH3) && sub_protocol != SLT_V1_4)
|
||||
if(sub_protocol>SLT_V2 && (i==CH2 || i==CH3) && sub_protocol != SLT_V1_4 && sub_protocol != RF_SIM)
|
||||
v=1023-v; // reverse throttle and elevator channels for Q100/Q200/MR100 protocols
|
||||
packet[i] = v;
|
||||
e = (e >> 2) | (uint8_t) ((v >> 2) & 0xC0);
|
||||
@ -165,8 +165,13 @@ static void __attribute__((unused)) SLT_build_packet()
|
||||
|GET_FLAG(CH12_SW, FLAG_MR100_PICTURE); // Does not exist on the Q100 but...
|
||||
packet[7]=convert_channel_8b(CH7);
|
||||
packet[8]=convert_channel_8b(CH8);
|
||||
if(sub_protocol==RF_SIM) {
|
||||
packet[9]=convert_channel_8b(CH9);
|
||||
packet[10]=convert_channel_8b(CH10);
|
||||
} else {
|
||||
packet[9]=0xAA; //normal mode for Q100/Q200, unknown for V2/MR100
|
||||
packet[10]=0x00; //normal mode for Q100/Q200, unknown for V2/MR100
|
||||
}
|
||||
if((sub_protocol==Q100 || sub_protocol==Q200) && CH13_SW)
|
||||
{//Calibrate
|
||||
packet[9]=0x77; //enter calibration
|
||||
|
@ -18,7 +18,7 @@ Multiprotocol is distributed in the hope that it will be useful,
|
||||
|
||||
#include "iface_xn297.h"
|
||||
|
||||
#define FORCE_XK2_ID
|
||||
//#define FORCE_XK2_ID
|
||||
|
||||
#define XK2_RF_BIND_CHANNEL 71
|
||||
#define XK2_PAYLOAD_SIZE 9
|
||||
@ -70,19 +70,21 @@ static void __attribute__((unused)) XK2_send_packet()
|
||||
//Flags
|
||||
packet[5] = GET_FLAG(CH5_SW, 0x01) //Rate
|
||||
| GET_FLAG(CH6_SW, 0x08) //Mode
|
||||
| GET_FLAG(CH7_SW, 0x20); //Hover
|
||||
| GET_FLAG(CH7_SW, 0x20) //Hover
|
||||
| GET_FLAG(CH8_SW, 0x40); //Light
|
||||
//Telemetry not received=00, Telemetry received=01 but sometimes switch to 1 even if telemetry is not there...
|
||||
packet[6] = 0x00;
|
||||
//Unknown
|
||||
packet[7] = crc8; //?? RX_ID checksum ?? => sum RX_ID[0..2]
|
||||
packet[7] = crc8; //Sum RX_ID[0..2]
|
||||
//Checksum seed
|
||||
packet[8] = 0x7F; //Constant?
|
||||
packet[8] = num_ch; //Based on TX ID
|
||||
}
|
||||
//Checksum
|
||||
for(uint8_t i=0; i<XK2_PAYLOAD_SIZE-1; i++)
|
||||
packet[8] += packet[i];
|
||||
|
||||
// Send
|
||||
XN297_SetFreqOffset();
|
||||
XN297_SetPower();
|
||||
XN297_SetTxRxMode(TX_EN);
|
||||
XN297_WritePayload(packet, XK2_PAYLOAD_SIZE);
|
||||
@ -108,14 +110,31 @@ static void __attribute__((unused)) XK2_RF_init()
|
||||
static void __attribute__((unused)) XK2_initialize_txid()
|
||||
{
|
||||
#ifdef FORCE_XK2_ID
|
||||
if(rx_tx_addr[3]&1)
|
||||
{//Pascal
|
||||
rx_tx_addr[0] = 0x66;
|
||||
rx_tx_addr[1] = 0x4F;
|
||||
rx_tx_addr[2] = 0x47;
|
||||
for(uint8_t i=0;i<XK2_RF_NUM_CHANNELS;i++)
|
||||
hopping_frequency[i] = 65 + i*4; //65=0x41, 69=0x45, 73=0x49, 77=0x4D
|
||||
num_ch = 0x7F;
|
||||
//hopping frequencies 65=0x41, 69=0x45, 73=0x49, 77=0x4D
|
||||
}
|
||||
else
|
||||
{//Marc
|
||||
rx_tx_addr[0] = 0x36;
|
||||
rx_tx_addr[1] = 0x49;
|
||||
rx_tx_addr[2] = 0x6B;
|
||||
num_ch = 0x79;
|
||||
//hopping frequencies 65=0x41, 69=0x45, 73=0x49, 77=0x4D
|
||||
}
|
||||
#endif
|
||||
rx_tx_addr[3] = 0xCC;
|
||||
rx_tx_addr[4] = 0xCC;
|
||||
rx_tx_addr[0] = rx_tx_addr[3]; // Use RX_num
|
||||
rx_tx_addr[3] = rx_tx_addr[4] = 0xCC;
|
||||
num_ch = 0x21 + rx_tx_addr[0] - rx_tx_addr[1] + rx_tx_addr[2];
|
||||
|
||||
for(uint8_t i=0;i<XK2_RF_NUM_CHANNELS;i++) // Are these RF frequencies always the same? It looks like yes...
|
||||
hopping_frequency[i] = 65 + i*4; //65=0x41, 69=0x45, 73=0x49, 77=0x4D
|
||||
|
||||
debugln("ID: %02X %02X %02X %02X %02X, OFFSET: %02X, HOP: %02X %02X %02X %02X",rx_tx_addr[0],rx_tx_addr[1],rx_tx_addr[2],rx_tx_addr[3],rx_tx_addr[4],num_ch,hopping_frequency[0],hopping_frequency[1],hopping_frequency[2],hopping_frequency[3]);
|
||||
}
|
||||
|
||||
uint16_t XK2_callback()
|
||||
@ -138,8 +157,6 @@ uint16_t XK2_callback()
|
||||
debug(" %02X",packet[i]);
|
||||
debugln("");
|
||||
#endif
|
||||
//phase = XK2_BIND1;
|
||||
//return 500;
|
||||
crc8 = 0xBF;
|
||||
for(uint8_t i=0; i<XK2_PAYLOAD_SIZE-1; i++)
|
||||
crc8 += packet[i];
|
||||
@ -271,6 +288,7 @@ P[4] = alternates 20,60,A0,E0
|
||||
P[5] = flags
|
||||
01=high rate
|
||||
20=hover=long_press_left
|
||||
40=light -> temporary
|
||||
08=6g/3d=short_press_right sequece also switches for a few packets to C1 if 8 C0 if 0
|
||||
P[6] = 00 telemetry nok
|
||||
01 telemetry ok but sometimes switch to 1 also when telemetry is nok...
|
||||
|
@ -19,14 +19,14 @@ Multiprotocol is distributed in the hope that it will be useful,
|
||||
|
||||
#define YUXIANG_FORCE_ID
|
||||
|
||||
#define YUXIANG_PACKET_PERIOD 12430
|
||||
#define YUXIANG_PACKET_PERIOD 12422
|
||||
#define YUXIANG_PACKET_SIZE 9
|
||||
#define YUXIANG_BIND_COUNT 20000
|
||||
#define YUXIANG_BIND_COUNT 150
|
||||
#define YUXIANG_BIND_FREQ 0x30
|
||||
#define YUXIANG_RF_NUM_CHANNELS 4
|
||||
|
||||
#define YUXIANG_WRITE_TIME 1000
|
||||
#define YUXIANG_TELEM_DEBUG
|
||||
//#define YUXIANG_TELEM_DEBUG
|
||||
|
||||
enum
|
||||
{
|
||||
@ -36,42 +36,47 @@ enum
|
||||
|
||||
static void __attribute__((unused)) YUXIANG_send_packet()
|
||||
{
|
||||
static bool bind_state = false;
|
||||
|
||||
if(bind_counter && (hopping_frequency_no & 0x0E) == 0)
|
||||
if(bind_counter && packet_sent < 5 && (hopping_frequency_no & 0x07) == 0)
|
||||
{
|
||||
bind_counter--;
|
||||
if(!bind_counter)
|
||||
BIND_DONE;
|
||||
XN297_Hopping(YUXIANG_BIND_FREQ);
|
||||
#if 0
|
||||
debug("B C:%d, ",YUXIANG_BIND_FREQ);
|
||||
#endif
|
||||
XN297_RFChannel(YUXIANG_BIND_FREQ);
|
||||
XN297_SetTXAddr((uint8_t*)"\x00\x00\x00\x00\x00", 5);
|
||||
XN297_SetRXAddr((uint8_t*)"\x00\x00\x00\x00\x00", YUXIANG_PACKET_SIZE);
|
||||
bind_state = true;
|
||||
bind_phase = 1;
|
||||
packet_sent++;
|
||||
}
|
||||
else
|
||||
{
|
||||
{//Normal operation
|
||||
XN297_Hopping(hopping_frequency_no & 0x03);
|
||||
if(bind_state)
|
||||
#if 0
|
||||
debug("C:%d, ",hopping_frequency[hopping_frequency_no & 0x03]);
|
||||
#endif
|
||||
hopping_frequency_no++;
|
||||
if(bind_phase)
|
||||
{
|
||||
XN297_SetTXAddr(rx_tx_addr, 5);
|
||||
XN297_SetRXAddr(rx_tx_addr, YUXIANG_PACKET_SIZE);
|
||||
bind_state = false;
|
||||
bind_phase = 0;
|
||||
packet_sent = 0;
|
||||
}
|
||||
}
|
||||
hopping_frequency_no++;
|
||||
|
||||
packet[0] = GET_FLAG(!bind_state, 0x80) // Bind packet
|
||||
packet[0] = GET_FLAG(!bind_phase, 0x80) // Bind packet
|
||||
| GET_FLAG(telemetry_lost, 0x20) // No telem
|
||||
| GET_FLAG(!CH5_SW, 0x10) // Lock
|
||||
| GET_FLAG(CH6_SW, 0x08) // High
|
||||
| GET_FLAG(CH12_SW, 0x01); // Screw pitch -> temporary
|
||||
| GET_FLAG(CH11_SW, 0x01); // Screw pitch -> temporary
|
||||
|
||||
packet[1] = GET_FLAG(CH7_SW, 0x08) // Land only when unlock
|
||||
| GET_FLAG(CH11_SW, 0x20); // Mode
|
||||
| GET_FLAG(CH10_SW, 0x20); // Mode
|
||||
|
||||
packet[2] = GET_FLAG(CH8_SW, 0x02) // Altitude hold
|
||||
| GET_FLAG(CH9_SW, 0x03) // Manual
|
||||
| GET_FLAG(CH10_SW, 0x40); // Flip
|
||||
packet[2] = GET_FLAG(CH5_SW, 0x02) // Altitude hold set when unlock
|
||||
| GET_FLAG(CH8_SW, 0x01) // Manual
|
||||
| GET_FLAG(CH9_SW, 0x40); // Flip
|
||||
|
||||
uint16_t value = convert_channel_16b_limit(AILERON,0,1000);
|
||||
packet[3] = value;
|
||||
@ -86,17 +91,15 @@ static void __attribute__((unused)) YUXIANG_send_packet()
|
||||
packet[6] = value;
|
||||
packet[7] |= (value >> 2) & 0xC0;
|
||||
|
||||
if(bind_state && (hopping_frequency_no&1))
|
||||
if(bind_phase)
|
||||
memcpy(&packet[3], rx_tx_addr, 4);
|
||||
else
|
||||
packet[0] |= 0x80;
|
||||
|
||||
uint8_t checksum = 0;
|
||||
for(uint8_t i=0; i<YUXIANG_PACKET_SIZE-1; i++)
|
||||
checksum += packet[i];
|
||||
packet[8] = checksum;
|
||||
|
||||
#if 1
|
||||
#if 0
|
||||
debug("P:");
|
||||
for(uint8_t i=0;i<YUXIANG_PACKET_SIZE;i++)
|
||||
debug(" %02X",packet[i]);
|
||||
@ -111,14 +114,12 @@ static void __attribute__((unused)) YUXIANG_send_packet()
|
||||
static void __attribute__((unused)) YUXIANG_RF_init()
|
||||
{
|
||||
XN297_Configure(XN297_CRCEN, XN297_SCRAMBLED, XN297_1M);
|
||||
XN297_SetTXAddr(rx_tx_addr, 5);
|
||||
XN297_SetRXAddr(rx_tx_addr, YUXIANG_PACKET_SIZE);
|
||||
}
|
||||
|
||||
static void __attribute__((unused)) YUXIANG_initialize_txid()
|
||||
{
|
||||
#ifdef YUXIANG_FORCE_ID
|
||||
if(RX_num==0)
|
||||
if(rx_tx_addr[3] & 0x01)
|
||||
{//TX1
|
||||
memcpy(rx_tx_addr,(uint8_t *)"\xB3\x13\x36\xDD",4); //rx_tx_addr[4]=0xD9
|
||||
memcpy(hopping_frequency,(uint8_t *)"\x49\x32\x35\x42",4);
|
||||
@ -138,7 +139,7 @@ static void __attribute__((unused)) YUXIANG_initialize_txid()
|
||||
|
||||
uint16_t YUXIANG_callback()
|
||||
{
|
||||
static bool rx = false;
|
||||
bool rx = false;
|
||||
|
||||
switch(phase)
|
||||
{
|
||||
@ -152,7 +153,7 @@ uint16_t YUXIANG_callback()
|
||||
packet_count++;
|
||||
#endif
|
||||
#ifdef MULTI_SYNC
|
||||
telemetry_set_input_sync(packet_period);
|
||||
telemetry_set_input_sync(YUXIANG_PACKET_PERIOD);
|
||||
#endif
|
||||
YUXIANG_send_packet();
|
||||
if(rx)
|
||||
@ -162,18 +163,22 @@ uint16_t YUXIANG_callback()
|
||||
#endif
|
||||
if(XN297_ReadPayload(packet_in, YUXIANG_PACKET_SIZE))
|
||||
{ // packet with good CRC and length
|
||||
#ifdef YUXIANG_TELEM_DEBUG
|
||||
debug("OK:");
|
||||
for(uint8_t i=0;i<YUXIANG_PACKET_SIZE;i++)
|
||||
debug(" %02X",packet_in[i]);
|
||||
#endif
|
||||
uint8_t checksum = 0;
|
||||
for(uint8_t i=0; i<YUXIANG_PACKET_SIZE-1; i++)
|
||||
checksum += packet_in[i];
|
||||
if(packet_in[8] == checksum)
|
||||
{
|
||||
#ifdef YUXIANG_HUB_TELEMETRY
|
||||
if(packet_in[0]==0x78)
|
||||
{
|
||||
#ifdef YUXIANG_TELEM_DEBUG
|
||||
debug("OK:");
|
||||
for(uint8_t i=0;i<YUXIANG_PACKET_SIZE;i++)
|
||||
debug(" %02X",packet_in[i]);
|
||||
#endif
|
||||
v_lipo1 = packet_in[4];
|
||||
v_lipo2 = packet_in[6];
|
||||
}
|
||||
telemetry_link = 1;
|
||||
#endif
|
||||
telemetry_lost = 0;
|
||||
@ -195,18 +200,21 @@ uint16_t YUXIANG_callback()
|
||||
}
|
||||
phase++;
|
||||
return YUXIANG_WRITE_TIME;
|
||||
case YUXIANG_RX:
|
||||
default:
|
||||
// RX
|
||||
{ // Wait for packet to be sent before switching to receive mode
|
||||
uint16_t start=(uint16_t)micros();
|
||||
while ((uint16_t)((uint16_t)micros()-(uint16_t)start) < 500)
|
||||
if(XN297_IsPacketSent())
|
||||
break;
|
||||
}
|
||||
//if(bind_phase)
|
||||
// XN297_Hopping(3);
|
||||
XN297_SetTxRxMode(RX_EN);
|
||||
phase = YUXIANG_DATA;
|
||||
return YUXIANG_PACKET_PERIOD - YUXIANG_WRITE_TIME;
|
||||
}
|
||||
return YUXIANG_PACKET_PERIOD;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void YUXIANG_init(void)
|
||||
@ -221,6 +229,8 @@ void YUXIANG_init(void)
|
||||
|
||||
phase = YUXIANG_DATA;
|
||||
hopping_frequency_no = 0;
|
||||
bind_phase = 1;
|
||||
packet_sent = 8;
|
||||
#ifdef YUXIANG_HUB_TELEMETRY
|
||||
packet_count = 0;
|
||||
telemetry_lost = 1;
|
||||
|
@ -779,6 +779,7 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
|
||||
F949G
|
||||
PROTO_MT99XX2
|
||||
PA18
|
||||
SU35
|
||||
PROTO_NCC1701
|
||||
NONE
|
||||
PROTO_OMP
|
||||
@ -830,6 +831,8 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
|
||||
Q100
|
||||
Q200
|
||||
MR100
|
||||
V1_4CH
|
||||
RF_SIM
|
||||
PROTO_SYMAX
|
||||
SYMAX
|
||||
SYMAX5C
|
||||
|
@ -6,6 +6,7 @@ Here are detailed descriptions of every supported protocols (sorted by RF module
|
||||
The Deviation project (on which this project was based) have a useful list of models and protocols [here](http://www.deviationtx.com/wiki/supported_models).
|
||||
|
||||
## Useful notes and definitions
|
||||
- **Surface and air protocols** - As the list of supported protocols grows even the STM32 ARM microcontroller cannot hold all of the protocols. Firmware available from the [Multi-Module](https://downloads.multi-module.org) website has been split into two groups, surface "SFC" and air "AIR". You can check which protocols are included in each of these groups in the [Validate.h](Multiprotocol/Validate.h) source file.
|
||||
- **Channel Order** - The channel order assumed in all the documentation is AETR. You can change this in the compilation settings or by using a precompiled firmware. The module will take whatever input channel order you have choosen and will rearrange them to match the output channel order required by the selected protocol.
|
||||
- **Channel ranges** - A radio output of -100%..0%..+100% will match on the selected protocol -100%,0%,+100%. No convertion needs to be done.
|
||||
- **Extended limits supported** - A channel range of -125%..+125% will be transmitted. Otherwise it will be truncated to -100%..+100%.
|
||||
@ -123,7 +124,7 @@ CFlie|38|CFlie||||||||NRF24L01|
|
||||
[MLINK](Protocols_Details.md#MLINK---78)|78|||||||||CYRF6936|
|
||||
[MouldKg](Protocols_Details.md#mouldkg---90)|90|Analog|Digit|||||||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||||||||NRF24L01|XN297
|
||||
[MT99xx2](Protocols_Details.md#MT99XX2---92)|92|PA18|SU35|||||||NRF24L01|XN297
|
||||
[NCC1701](Protocols_Details.md#NCC1701---44)|44|||||||||NRF24L01|
|
||||
[OMP](Protocols_Details.md#OMP---77)|77|||||||||CC2500&NRF24L01|XN297L
|
||||
[OpenLRS](Protocols_Details.md#OpenLRS---27)|27|||||||||None|
|
||||
@ -141,9 +142,9 @@ CFlie|38|CFlie||||||||NRF24L01|
|
||||
[SGF22](Protocols_Details.md#SGF22---97)|97|F22|F22S|J20||||||NRF24L01|XN297
|
||||
[Shenqi](Protocols_Details.md#Shenqi---19)|19|Shenqi||||||||NRF24L01|LT8900
|
||||
[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|||NRF24L01|CC2500
|
||||
[SLT](Protocols_Details.md#SLT---11)|11|SLT_V1|SLT_V2|Q100|Q200|MR100|V1_4CH|RF_SIM||NRF24L01|CC2500
|
||||
[SymaX](Protocols_Details.md#Symax---10)|10|SYMAX|SYMAX5C|||||||NRF24L01|
|
||||
[Traxxas](Protocols_Details.md#Traxxas---43)|43|TQ1|TQ2|||||||CYRF6936|
|
||||
[Traxxas](Protocols_Details.md#Traxxas---43)|43|TQ2|TQ1|||||||CYRF6936|
|
||||
[V2x2](Protocols_Details.md#V2X2---5)|5|V2x2|JXD506|MR101||||||NRF24L01|
|
||||
[V761](Protocols_Details.md#V761---48)|48|3CH|4CH|TOPRC||||||NRF24L01|XN297
|
||||
[V911S](Protocols_Details.md#V911S---46)|46|V911S*|E119*|||||||NRF24L01|XN297
|
||||
@ -698,12 +699,7 @@ A|E|T|R
|
||||
|
||||
## Traxxas - *43*
|
||||
|
||||
### Sub_protocol TQ1 - *0*
|
||||
Transmitter 2228 TX and a 2217 RX
|
||||
|
||||
Under dev
|
||||
|
||||
### Sub_protocol TQ2 - *1*
|
||||
### Sub_protocol TQ2 - *0*
|
||||
Transmitter TQ, Receivers: 6519, 2218(X), ECM-2.5
|
||||
|
||||
Extended limits supported
|
||||
@ -714,6 +710,9 @@ CH1|CH2|CH3|CH4|CH5|CH6
|
||||
|
||||
Warning from v1.3.4.7 channels order have changed
|
||||
|
||||
### Sub_protocol TQ1 - *1*
|
||||
Transmitter 2228 TX and a 2217 RX
|
||||
|
||||
## WFLY - *40*
|
||||
Receivers: WFR04S, WFR07S, WFR09S
|
||||
|
||||
@ -1260,7 +1259,7 @@ Unk1&2: long press right/left
|
||||
|
||||
## MT99XX2 - *92*
|
||||
|
||||
### Sub_protocol PA18 - *92*
|
||||
### Sub_protocol PA18 - *0*
|
||||
Model: PA18 mini
|
||||
|
||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7
|
||||
@ -1269,6 +1268,17 @@ A|E|T|R|MODE|FLIP|RTH
|
||||
|
||||
MODE: -100% beginner, 0% intermediate, +100% Expert
|
||||
|
||||
### Sub_protocol SU35 - *1*
|
||||
Model: QF009 SU35
|
||||
|
||||
CH6 - LED, CH7 - LED Flash, CH8 - Invert, CH9 - Rate
|
||||
|
||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
|
||||
---|---|---|---|---|---|---|---|---
|
||||
A|E|T|R|MODE|LED|LED_FLASH|INVERT|RATE
|
||||
|
||||
MODE: -100% 6G, +100% 3D
|
||||
|
||||
## OMP - *77*
|
||||
Model: OMPHOBBY M1 & M2 Helis, T720 RC Glider
|
||||
|
||||
@ -1430,6 +1440,23 @@ CH1|CH2|CH3|CH4
|
||||
---|---|---|---
|
||||
CH1|CH2|CH3|CH4
|
||||
|
||||
### Sub_protocol RF_SIM - *6*
|
||||
Models: the SLT-dongle included in RealFlight 7.5
|
||||
|
||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10
|
||||
---|---|---|---|---|---|---|---|---|----
|
||||
A|E|T|R|CH5|CH6|CH7|CH8|CH9|CH10
|
||||
|
||||
Output 10 channels to use with RealFlight simulator.
|
||||
The RealFlight "reset" button found on the RealFlight USB-transmitter, can now be CH9 or CH10.
|
||||
|
||||
RealFlight 8 crashes when trying to save file with reset-button defined.
|
||||
|
||||
Please save radio-profile with a new name without setting reset-button in RF8. Then edit the radio-profile definition in ~\Documents\RealFlight8\RadioProfiles\ in an ordinary fileeditor.
|
||||
|
||||
Find the [Reset21] section and change Input=INT:-1 to Input=INT:9
|
||||
|
||||
|
||||
## V911S - *46*
|
||||
|
||||
CH1|CH2|CH3|CH4|CH5|CH6
|
||||
@ -1488,17 +1515,15 @@ Models: WLtoys cars 284131/284161/284010/124016/124017/144010 and Eachine EAT14
|
||||
## XK2 - *99*
|
||||
|
||||
### Sub_protocol X4 - *0*
|
||||
Transmitter: XK X4-A160, model: XK A160S
|
||||
|
||||
**Only 1 ID and might only work with my plane**
|
||||
Transmitter: XK X4-A160, X5S, model: XK A160S, XK A280, XK A300
|
||||
|
||||
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
|
||||
---|---|---|---|---|---|---
|
||||
A|E|T|R|Rate|Mode|Hover
|
||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
|
||||
---|---|---|---|---|---|---|---
|
||||
A|E|T|R|Rate|Mode|Hover|Light
|
||||
|
||||
The plane does not need to be bound each time if it is powered on **after** the radio/protocol is on.
|
||||
|
||||
@ -2190,11 +2215,14 @@ Same channels assignement as above.
|
||||
|
||||
## YuXiang - *100*
|
||||
|
||||
**Only 1 TX ID**. Bind might not work... Telemetry is received but content unknown yet.
|
||||
Models: E190, F07 UH-1D
|
||||
|
||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
|
||||
---|---|---|---|---|---|---|---|---|---|---|---
|
||||
A|E|T|R|LOCK|RATE|LAND|ALTHOL|MANUAL|FLIP|MODE|PITCH
|
||||
**Only 2 TX ID, use the RX number to switch**.
|
||||
Telemetry A1=Batt voltage with a Ratio 3.5 and Offset 7, A2=Low batt with 0=OK, everything else=BAD
|
||||
|
||||
CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11
|
||||
---|---|---|---|---|---|---|---|---|---|---
|
||||
A|E|T|R|LOCK|RATE|LAND|MANUAL|FLIP|MODE|PITCH
|
||||
|
||||
## ZSX - *52*
|
||||
Model: JJRC ZSX-280
|
||||
|
@ -100,9 +100,9 @@ For example, if you have no interest in binding your Tx to an model with and FrS
|
||||
|
||||
## **Choice 3:** Which protocols to upload to the MULTI-Module
|
||||
|
||||
In the case of the ATmega328, the memory required by all the possible protocols exceeds the 32KB flash limit considerably. This means that you will need to make a choice of which protocols you will compile into your firmware. Fortunately, the process of selecting and compiling is not too difficult and it is fully documented on the [Compiling and Programming](docs/Compiling.md) page.
|
||||
As the list of supported protocols grows even the STM32 ARM microcontroller cannot hold all of the protocols. You can select the protocols you need and complie your own firmware. Fortunately, the process of selecting and compiling is not too difficult and it is fully documented on the [Compiling and Programming](docs/Compiling.md) page. You can also download firmware from the [Multi-Module](https://downloads.multi-module.org) website. These firmware files have been split into two groups, surface "SFC" and air "AIR". You can check which protocols are included in each of these groups in the [Validate.h](Multiprotocol/Validate.h) source file.
|
||||
|
||||
An alternative is to use a STM32 ARM microcontroller based module which can hold all the protocols.
|
||||
In the case of the ATmega328, the memory required by all the possible protocols exceeds the 32KB flash limit considerably. This means that you will need to make a choice of which protocols you will compile into your firmware.
|
||||
|
||||
## **Choice 4:** Choosing the type of interface between the MULTI-Module and your radio (PPM or Serial)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user