Compare commits

..

18 Commits

Author SHA1 Message Date
pascallanger
b3537ea75a DSM2_SFC try 3 2024-03-26 16:18:34 +01:00
pascallanger
bccc050165 DSM2_SFC try 2 2024-03-26 14:41:19 +01:00
pascallanger
0f0df176de DSM2_SFC try 1
Servo refresh rate -> frame rate 16.5/11ms
2024-03-26 14:37:26 +01:00
pascallanger
5542e7005d ASF try 3 2024-03-26 11:43:42 +01:00
pascallanger
eb35fefd3e ASF try 2 2024-03-25 15:17:51 +01:00
pascallanger
5acc3a8d01 CYRF6936: Findbestchannels flag addition 2024-03-25 15:11:31 +01:00
pascallanger
9e9c3958c6 ASF: try 1 2024-03-23 11:23:42 +01:00
pascallanger
7f3a93ca4c Kyosho3: increase bind time to 2.5s 2024-03-22 18:24:31 +01:00
pascallanger
debc9de11a New protocol Kyosho3/ASF
Only 1 ID and 1 frequency for now
2024-03-22 18:17:21 +01:00
pascallanger
f117105124 SGF22: Fix none working IDs 2024-03-21 16:33:16 +01:00
pascallanger
2e3520acad DSM2SFC timing update 2024-03-19 20:52:50 +01:00
pascallanger
91af921d98 Update Protocols_Details.md 2024-03-19 15:47:56 +01:00
pascallanger
ab45ec6d1c Update Validate.h 2024-03-19 15:44:29 +01:00
pascallanger
26b0b6bd20 Update DSM_cyrf6936.ino 2024-03-19 15:44:21 +01:00
pascallanger
1b9ce32e89 Update DSM_cyrf6936.ino 2024-03-19 14:11:40 +01:00
pascallanger
332e55831c Update Protocols_Details.md 2024-03-18 17:11:23 +01:00
pascallanger
7051438e5d Update Protocols_Details.md 2024-03-18 17:00:40 +01:00
pascallanger
28467fac57 DSM/DSM2SFC new subprotocol 2024-03-18 16:57:54 +01:00
18 changed files with 284 additions and 86 deletions

View File

@@ -35,6 +35,7 @@
6,3,DSM,X_2F,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12,n-a,ThKill 6,3,DSM,X_2F,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12,n-a,ThKill
6,4,DSM,AUTO,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12,n-a,ThKill 6,4,DSM,AUTO,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12,n-a,ThKill
6,5,DSM,R_1F,0,AUX3,AUX4,AUX5 6,5,DSM,R_1F,0,AUX3,AUX4,AUX5
6,6,DSM,2SFC,0
70,0,DSM_RX,RX,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12 70,0,DSM_RX,RX,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12
70,1,DSM_RX,CPPM,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12 70,1,DSM_RX,CPPM,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12
45,0,E01X,E012,1,n-a,Flip,n-a,HLess,RTH 45,0,E01X,E012,1,n-a,Flip,n-a,HLess,RTH
@@ -215,3 +216,4 @@
96,0,BumbleB 96,0,BumbleB
97,0,SGF22,Std,1,Mode,Flip,LED,Pict,Video 97,0,SGF22,Std,1,Mode,Flip,LED,Pict,Video
61,1,EazyRC 61,1,EazyRC
98,0,Kyosho3,ASF,0

View File

@@ -249,7 +249,7 @@ void CYRF_WriteDataPacket(const uint8_t dpbuffer[])
} }
*/ */
//NOTE: This routine will reset the CRC Seed //NOTE: This routine will reset the CRC Seed
void CYRF_FindBestChannels(uint8_t *channels, uint8_t len, uint8_t minspace, uint8_t min, uint8_t max) void CYRF_FindBestChannels(uint8_t *channels, uint8_t len, uint8_t minspace, uint8_t min, uint8_t max, uint8_t forced)
{ {
#define NUM_FREQ 80 #define NUM_FREQ 80
#define FREQ_OFFSET 4 #define FREQ_OFFSET 4
@@ -269,7 +269,12 @@ void CYRF_FindBestChannels(uint8_t *channels, uint8_t len, uint8_t minspace, uin
delayMilliseconds(1); delayMilliseconds(1);
for(i = 0; i < NUM_FREQ; i++) for(i = 0; i < NUM_FREQ; i++)
{ {
CYRF_ConfigRFChannel(protocol==PROTO_LOSI?i|1:i); if(((i&1) && forced == FIND_CHANNEL_EVEN) || (!(i&1) && forced == FIND_CHANNEL_ODD))
{
rssi[i] = 0xFF;
continue;
}
CYRF_ConfigRFChannel(i); //protocol==PROTO_LOSI?i|1:i);
delayMicroseconds(270); //slow channel require 270usec for synthesizer to settle delayMicroseconds(270); //slow channel require 270usec for synthesizer to settle
if( !(CYRF_ReadRegister(CYRF_05_RX_CTRL) & 0x80)) { if( !(CYRF_ReadRegister(CYRF_05_RX_CTRL) & 0x80)) {
CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x80); //Prepare to receive CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x80); //Prepare to receive

View File

@@ -267,6 +267,7 @@ uint16_t DSM_RX_callback()
0x01 => 22ms 1024 DSM2 1 packet => number of channels is <8 0x01 => 22ms 1024 DSM2 1 packet => number of channels is <8
0x02 => 22ms 1024 DSM2 2 packets => either a number of channel >7 0x02 => 22ms 1024 DSM2 2 packets => either a number of channel >7
0x12 => 11ms 2048 DSM2 2 packets => can be any number of channels 0x12 => 11ms 2048 DSM2 2 packets => can be any number of channels
0x23 => DX3R DSM2 2 surface packets
0xA2 => 22ms 2048 DSMX 1 packet => number of channels is <8 0xA2 => 22ms 2048 DSMX 1 packet => number of channels is <8
0xB2 => 11ms 2048 DSMX => can be any number of channels 0xB2 => 11ms 2048 DSMX => can be any number of channels
(0x01 or 0xA2) and num_ch < 7 => 22ms else 11ms (0x01 or 0xA2) and num_ch < 7 => 22ms else 11ms

View File

@@ -19,11 +19,10 @@
//#define DSM_DEBUG_FWD_PGM //#define DSM_DEBUG_FWD_PGM
//#define DEBUG_BIND 1 //#define DEBUG_BIND 1
//#define DSM_GR300
#define CLONE_BIT_MASK 0x20 #define CLONE_BIT_MASK 0x20
#define DSM_BIND_CHANNEL 0x0D //13 This can be any odd channel
#define DSM_BIND_CHANNEL 0x0d //13 This can be any odd channel #define DSM2_SFC_PERIOD 16500
//During binding we will send BIND_COUNT packets //During binding we will send BIND_COUNT packets
//One packet each 10msec //One packet each 10msec
@@ -32,8 +31,8 @@
// Lemon-RX G2s seems to have a timeout waiting for the channel to get quiet after the // Lemon-RX G2s seems to have a timeout waiting for the channel to get quiet after the
// first good BIND packet.. If using 3s (300), Lemon-RX will not transmit the BIND-Response packet. // first good BIND packet.. If using 3s (300), Lemon-RX will not transmit the BIND-Response packet.
#define DSM_BIND_COUNT 180 // About 1.8s #define DSM_BIND_COUNT 180 // About 1.8s
#define DSM_BIND_COUNT_READ 600 // About 4.2s of waiting for Response #define DSM_BIND_COUNT_READ 600 // About 4.2s of waiting for Response
enum { enum {
DSM_BIND_WRITE=0, DSM_BIND_WRITE=0,
@@ -95,9 +94,12 @@ static void __attribute__((unused)) DSM_build_bind_packet()
packet[11] = 12; packet[11] = 12;
else else
packet[11] = num_ch; // DX5 DSMR sends 0x48... packet[11] = num_ch; // DX5 DSMR sends 0x48...
//packet[11] = 3; // DX3R
if (sub_protocol==DSMR) if (sub_protocol==DSMR)
packet[12] = 0xa2; packet[12] = 0xa2;
else if (sub_protocol==DSM2_SFC)
packet[12] = 0x23; // DX3R
else if (sub_protocol==DSM2_1F) else if (sub_protocol==DSM2_1F)
packet[12] = num_ch<8?0x01:0x02; // DSM2/1024 1 or 2 packets depending on the number of channels packet[12] = num_ch<8?0x01:0x02; // DSM2/1024 1 or 2 packets depending on the number of channels
else if(sub_protocol==DSM2_2F) else if(sub_protocol==DSM2_2F)
@@ -110,7 +112,6 @@ static void __attribute__((unused)) DSM_build_bind_packet()
#endif #endif
else // DSMX_2F && DSM_AUTO else // DSMX_2F && DSM_AUTO
packet[12] = 0xb2; // DSMX/2048 2 packets packet[12] = 0xb2; // DSMX/2048 2 packets
packet[13] = 0x00; //??? packet[13] = 0x00; //???
for(i = 8; i < 14; i++) for(i = 8; i < 14; i++)
@@ -137,8 +138,13 @@ static void __attribute__((unused)) DSM_update_channels()
if(num_ch<3 || num_ch>12) if(num_ch<3 || num_ch>12)
num_ch=6; // Default to 6 channels if invalid choice... num_ch=6; // Default to 6 channels if invalid choice...
if(sub_protocol==DSMR && num_ch>7) #ifndef MULTI_AIR
num_ch=7; // Max 7 channels in DSMR if(sub_protocol==DSMR && num_ch>7)
num_ch=7; // Max 7 channels in DSMR
if(sub_protocol==DSM2_SFC && num_ch>5)
num_ch=5; // Max 5 channels in DSM2_SFC
#endif
// Create channel map based on number of channels and refresh rate // Create channel map based on number of channels and refresh rate
uint8_t idx=num_ch-3; uint8_t idx=num_ch-3;
@@ -175,13 +181,17 @@ static void __attribute__((unused)) DSM_build_data_packet(uint8_t upper)
} }
#ifndef MULTI_AIR #ifndef MULTI_AIR
if(sub_protocol == DSMR) if(sub_protocol == DSMR || sub_protocol == DSM2_SFC)
{ { // 12 bits, full range, no reassignment
for (uint8_t i = 0; i < 7; i++) for (uint8_t i = 0; i < 7; i++)
{ {
uint16_t value = 0x0000; uint16_t value = 0x0000;
if(i < num_ch) if(i < num_ch)
{
value=Channel_data[i]<<1; value=Channel_data[i]<<1;
if(sub_protocol == DSM2_SFC)
value |= i<<12;
}
packet[i*2+2] = (value >> 8) & 0xff; packet[i*2+2] = (value >> 8) & 0xff;
packet[i*2+3] = (value >> 0) & 0xff; packet[i*2+3] = (value >> 0) & 0xff;
} }
@@ -266,12 +276,18 @@ static uint8_t __attribute__((unused)) DSM_Check_RX_packet()
uint16_t DSM_callback() uint16_t DSM_callback()
{ {
#if defined MULTI_EU #if defined MULTI_EU
if(sub_protocol == DSM2_1F || sub_protocol == DSM2_2F) if(sub_protocol == DSM2_1F || sub_protocol == DSM2_2F || sub_protocol == DSM2_SFC)
{
SUB_PROTO_INVALID;
return 11000; return 11000;
}
#endif #endif
#if defined MULTI_AIR #if defined MULTI_AIR
if(sub_protocol == DSMR) if(sub_protocol == DSMR || sub_protocol == DSM2_SFC)
{
SUB_PROTO_INVALID;
return 11000; return 11000;
}
#endif #endif
#define DSM_CH1_CH2_DELAY 4010 // Time between write of channel 1 and channel 2 #define DSM_CH1_CH2_DELAY 4010 // Time between write of channel 1 and channel 2
#ifdef STM32_BOARD #ifdef STM32_BOARD
@@ -285,12 +301,7 @@ uint16_t DSM_callback()
uint8_t len; uint8_t len;
#endif #endif
uint8_t start; uint8_t start;
//debugln("P=%d",phase);
#ifdef DSM_GR300
uint16_t timing=5000+(convert_channel_8b(CH13)*100);
debugln("T=%u",timing);
#endif
switch(phase) switch(phase)
{ {
case DSM_BIND_WRITE: case DSM_BIND_WRITE:
@@ -304,11 +315,11 @@ uint16_t DSM_callback()
return 10000; return 10000;
#if defined DSM_TELEMETRY #if defined DSM_TELEMETRY
case DSM_BIND_CHECK: case DSM_BIND_CHECK:
#if DEBUG_BIND #if DEBUG_BIND
debugln("Bind Check"); debugln("Bind Check");
#endif #endif
//64 SDR Mode is configured so only the 8 first values are needed //64 SDR Mode is configured so only the 8 first values are needed
CYRF_ConfigDataCode((const uint8_t *)"\x98\x88\x1B\xE4\x30\x79\x03\x84"); CYRF_ConfigDataCode((const uint8_t *)"\x98\x88\x1B\xE4\x30\x79\x03\x84");
CYRF_SetTxRxMode(RX_EN); //Receive mode CYRF_SetTxRxMode(RX_EN); //Receive mode
CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x87); //Prepare to receive CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x87); //Prepare to receive
bind_counter=DSM_BIND_COUNT_READ; //Timeout of 4.2s if no packet received bind_counter=DSM_BIND_COUNT_READ; //Timeout of 4.2s if no packet received
@@ -371,25 +382,38 @@ uint16_t DSM_callback()
CYRF_SetTxRxMode(TX_EN); CYRF_SetTxRxMode(TX_EN);
hopping_frequency_no = 0; hopping_frequency_no = 0;
phase = DSM_CH1_WRITE_A; // in fact phase++ phase = DSM_CH1_WRITE_A; // in fact phase++
#ifndef MULTI_AIR
if(sub_protocol == DSMR) if(sub_protocol == DSMR)
DSM_set_sop_data_crc(false, true); DSM_set_sop_data_crc(false, true);
else else
#endif
DSM_set_sop_data_crc(true, sub_protocol==DSMX_2F||sub_protocol==DSMX_1F); //prep CH1 DSM_set_sop_data_crc(true, sub_protocol==DSMX_2F||sub_protocol==DSMX_1F); //prep CH1
return 10000; return 10000;
case DSM_CH1_WRITE_A: case DSM_CH1_WRITE_A:
#ifdef MULTI_SYNC #ifdef MULTI_SYNC
telemetry_set_input_sync(11000); // Always request 11ms spacing even if we don't use half of it in 22ms mode if(sub_protocol!=DSM2_SFC || option&0x40) // option&40 in this case is 16.5ms/11ms frame rate for DSM2_SFC
telemetry_set_input_sync(11000); // Always request 11ms spacing even if we don't use half of it in 22ms mode
else
telemetry_set_input_sync(DSM2_SFC_PERIOD);
#endif #endif
#ifndef MULTI_AIR
if(sub_protocol == DSMR) if(sub_protocol == DSMR)
CYRF_SetPower(0x08); //Keep transmit power in sync CYRF_SetPower(0x08); //Keep transmit power in sync
else else
#endif
CYRF_SetPower(0x28); //Keep transmit power in sync CYRF_SetPower(0x28); //Keep transmit power in sync
case DSM_CH1_WRITE_B: case DSM_CH1_WRITE_B:
DSM_build_data_packet(phase == DSM_CH1_WRITE_B); // build lower or upper channels DSM_build_data_packet(phase == DSM_CH1_WRITE_B); // build lower or upper channels
case DSM_CH2_WRITE_A: case DSM_CH2_WRITE_A:
case DSM_CH2_WRITE_B: case DSM_CH2_WRITE_B:
CYRF_ReadRegister(CYRF_04_TX_IRQ_STATUS); // clear IRQ flags CYRF_ReadRegister(CYRF_04_TX_IRQ_STATUS); // clear IRQ flags
CYRF_WriteDataPacket(packet); //debugln_time("");
#ifndef MULTI_AIR
if(sub_protocol==DSM2_SFC)
CYRF_WriteDataPacketLen(packet,2*(num_ch+1));
else
#endif
CYRF_WriteDataPacket(packet);
#if 0 #if 0
for(uint8_t i=0;i<16;i++) for(uint8_t i=0;i<16;i++)
debug(" %02X", packet[i]); debug(" %02X", packet[i]);
@@ -426,14 +450,19 @@ uint16_t DSM_callback()
phase++; // change from CH2_CHECK to CH2_READ phase++; // change from CH2_CHECK to CH2_READ
CYRF_SetTxRxMode(RX_EN); //Receive mode CYRF_SetTxRxMode(RX_EN); //Receive mode
CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x87); //0x80??? //Prepare to receive CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x87); //0x80??? //Prepare to receive
if(sub_protocol==DSMR) #ifndef MULTI_AIR
{ if(sub_protocol==DSMR || sub_protocol == DSM2_SFC)
phase = DSM_CH2_READ_B; {
return 11000 - DSM_WRITE_DELAY - DSM_READ_DELAY; phase = DSM_CH2_READ_B;
} if(sub_protocol == DSM2_SFC)
#ifdef DSM_GR300 {
if(num_ch==3) if(option&0x40) // option&40 in this case is 16.5ms/11ms frame rate for DSM2_SFC
return timing - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY - DSM_READ_DELAY; return 11000 - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY - DSM_READ_DELAY;
else
return DSM2_SFC_PERIOD - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY - DSM_READ_DELAY;
}
return 11000 - DSM_WRITE_DELAY - DSM_READ_DELAY;
}
#endif #endif
return 11000 - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY - DSM_READ_DELAY; return 11000 - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY - DSM_READ_DELAY;
case DSM_CH2_READ_A: case DSM_CH2_READ_A:
@@ -468,10 +497,6 @@ uint16_t DSM_callback()
CYRF_WriteRegister(CYRF_29_RX_ABORT, 0x00); // Clear abort RX operation CYRF_WriteRegister(CYRF_29_RX_ABORT, 0x00); // Clear abort RX operation
CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x87); //0x80??? //Prepare to receive CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x87); //0x80??? //Prepare to receive
phase = DSM_CH2_READ_B; phase = DSM_CH2_READ_B;
#ifdef DSM_GR300
if(num_ch==3)
return timing;
#endif
return 11000; return 11000;
} }
if (phase == DSM_CH2_READ_A) if (phase == DSM_CH2_READ_A)
@@ -492,19 +517,20 @@ uint16_t DSM_callback()
else else
{ //Normal mode 22ms { //Normal mode 22ms
phase = DSM_CH1_WRITE_A; // change from CH2_CHECK_A to CH1_WRITE_A (ie no upper) phase = DSM_CH1_WRITE_A; // change from CH2_CHECK_A to CH1_WRITE_A (ie no upper)
#ifdef DSM_GR300 #ifndef MULTI_AIR
if(num_ch==3) if(sub_protocol==DSM2_SFC)
return timing - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY ; {
if(option&0x40) // option&40 in this case is 16.5ms/11ms frame rate for DSM2_SFC
return 11000 - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY ;
else
return DSM2_SFC_PERIOD - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY ;
}
#endif #endif
return 22000 - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY ; return 22000 - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY ;
} }
} }
else else
phase = DSM_CH1_WRITE_A; // change from CH2_CHECK_B to CH1_WRITE_A (upper already transmitted so transmit lower) phase = DSM_CH1_WRITE_A; // change from CH2_CHECK_B to CH1_WRITE_A (upper already transmitted so transmit lower)
#ifdef DSM_GR300
if(num_ch==3)
return timing - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY ;
#endif
return 11000 - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY; return 11000 - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY;
#endif #endif
} }
@@ -547,15 +573,13 @@ void DSM_init()
SUB_PROTO_INVALID; SUB_PROTO_INVALID;
else else
{ {
SUB_PROTO_VALID; //SUB_PROTO_VALID;
uint8_t row = rx_tx_addr[3]%22; uint8_t row = rx_tx_addr[3]%22;
for(uint8_t i=0; i< 4; i++) for(uint8_t i=0; i< 4; i++)
cyrfmfg_id[i] = pgm_read_byte_near(&DSMR_ID_FREQ[row][i]); cyrfmfg_id[i] = pgm_read_byte_near(&DSMR_ID_FREQ[row][i]);
for(uint8_t i=0; i< 23; i++) for(uint8_t i=0; i< 23; i++)
hopping_frequency[i] = pgm_read_byte_near(&DSMR_ID_FREQ[row][i+4]); hopping_frequency[i] = pgm_read_byte_near(&DSMR_ID_FREQ[row][i+4]);
} }
#else
SUB_PROTO_INVALID;
#endif #endif
} }
else else
@@ -568,25 +592,25 @@ void DSM_init()
uint16_t temp = DSM_CLONE_EEPROM_OFFSET; uint16_t temp = DSM_CLONE_EEPROM_OFFSET;
for(uint8_t i=0;i<4;i++) for(uint8_t i=0;i<4;i++)
cyrfmfg_id[i] = eeprom_read_byte((EE_ADDR)temp++); cyrfmfg_id[i] = eeprom_read_byte((EE_ADDR)temp++);
#if DEBUG_BIND #if DEBUG_BIND
debugln("Using cloned ID"); debugln("Using cloned ID");
debug("Clone ID=") debug("Clone ID=")
for(uint8_t i=0;i<4;i++) for(uint8_t i=0;i<4;i++)
debug("%02x ", cyrfmfg_id[i]); debug("%02x ", cyrfmfg_id[i]);
debugln(""); debugln("");
#endif #endif
} }
else else
{ {
SUB_PROTO_INVALID; SUB_PROTO_INVALID;
#if DEBUG_BIND #if DEBUG_BIND
debugln("No valid cloned ID"); debugln("No valid cloned ID");
#endif #endif
} }
} }
else else
{ {
SUB_PROTO_VALID; //SUB_PROTO_VALID;
CYRF_GetMfgData(cyrfmfg_id); CYRF_GetMfgData(cyrfmfg_id);
} }
} }
@@ -602,8 +626,8 @@ void DSM_init()
//Fix for OrangeRX using wrong DSM_pncodes by preventing access to "Col 8" //Fix for OrangeRX using wrong DSM_pncodes by preventing access to "Col 8"
if(sop_col==0 && sub_protocol != DSMR) if(sop_col==0 && sub_protocol != DSMR)
{ {
cyrfmfg_id[rx_tx_addr[0]%3]^=0x01; //Change a bit so sop_col will be different from 0 cyrfmfg_id[rx_tx_addr[0]%3]^=0x01; //Change a bit so sop_col will be different from 0
sop_col = (cyrfmfg_id[0] + cyrfmfg_id[1] + cyrfmfg_id[2] + 2) & 0x07; sop_col = (cyrfmfg_id[0] + cyrfmfg_id[1] + cyrfmfg_id[2] + 2) & 0x07;
} }
} }
@@ -616,7 +640,7 @@ void DSM_init()
else if(sub_protocol != DSMR) else if(sub_protocol != DSMR)
{ {
uint8_t tmpch[10]; uint8_t tmpch[10];
CYRF_FindBestChannels(tmpch, 10, 5, 3, 75); CYRF_FindBestChannels(tmpch, 10, 5, 3, 75, FIND_CHANNEL_ANY);
// //
uint8_t idx = random(0xfefefefe) % 10; uint8_t idx = random(0xfefefefe) % 10;
hopping_frequency[0] = tmpch[idx]; hopping_frequency[0] = tmpch[idx];
@@ -639,10 +663,10 @@ void DSM_init()
{ {
DSM_initialize_bind_phase(); DSM_initialize_bind_phase();
phase = DSM_BIND_WRITE; phase = DSM_BIND_WRITE;
bind_counter=DSM_BIND_COUNT; bind_counter=DSM_BIND_COUNT;
#if DEBUG_BIND #if DEBUG_BIND
debugln("Bind Started: write count=%d",bind_counter); debugln("Bind Started: write count=%d",bind_counter);
#endif #endif
} }
else else
phase = DSM_CHANSEL; phase = DSM_CHANSEL;

View File

@@ -365,7 +365,7 @@ static void __attribute__((unused)) DEVO_cyrf_init()
static void __attribute__((unused)) DEVO_set_radio_channels() static void __attribute__((unused)) DEVO_set_radio_channels()
{ {
CYRF_FindBestChannels(hopping_frequency, 3, 4, 4, 80); CYRF_FindBestChannels(hopping_frequency, 3, 4, 4, 80, FIND_CHANNEL_ANY);
hopping_frequency[3] = hopping_frequency[0]; hopping_frequency[3] = hopping_frequency[0];
hopping_frequency[4] = hopping_frequency[1]; hopping_frequency[4] = hopping_frequency[1];
} }

View File

@@ -124,7 +124,7 @@ static void __attribute__((unused)) j6pro_set_radio_channels()
{ {
//FIXME: Query free channels //FIXME: Query free channels
//lowest channel is 0x08, upper channel is 0x4d? //lowest channel is 0x08, upper channel is 0x4d?
CYRF_FindBestChannels(hopping_frequency, 3, 5, 8, 77); CYRF_FindBestChannels(hopping_frequency, 3, 5, 8, 77, FIND_CHANNEL_ANY);
hopping_frequency[3] = hopping_frequency[0]; hopping_frequency[3] = hopping_frequency[0];
} }

View File

@@ -0,0 +1,125 @@
/*
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/>.
*/
#if defined(KYOSHO3_CYRF6936_INO)
#include "iface_cyrf6936.h"
//#define KYOSHO3_FORCE_ID
//#define KYOSHO3_DEBUG
#define KYOSHO3_BIND_PACKET_SIZE 4
#define KYOSHO3_PACKET_SIZE 9
const uint8_t PROGMEM KYOSHO3_init_vals[][2] = {
//Init from dump
{CYRF_0B_PWR_CTRL, 0x00}, // PMU
{CYRF_32_AUTO_CAL_TIME, 0x3C}, // Default init value
{CYRF_35_AUTOCAL_OFFSET, 0x14}, // Default init value
{CYRF_03_TX_CFG, 0x28 | CYRF_BIND_POWER}, // 8DR Mode, 64 chip codes
{CYRF_10_FRAMING_CFG, 0xA4}, // SOP and LEN enable
{CYRF_1F_TX_OVERRIDE, 0x05}, // Disable CRC, Data invert
{CYRF_1E_RX_OVERRIDE, 0x04}, // CRC check disabled
//{CYRF_11_DATA32_THOLD, 0x04}, // ???Using 64 chip...
{CYRF_12_DATA64_THOLD, 0x0E}, // Default
{CYRF_06_RX_CFG, 0x52}, // AGC disabled, LNA enabled, override enabled
};
static uint16_t __attribute__((unused)) KYOSHO3_send_packet()
{
CYRF_SetPower(0x28);
if(IS_BIND_IN_PROGRESS)
{
packet[0] = 0xAA;
//ID
memcpy(&packet[1],&rx_tx_addr[1],3);
CYRF_WriteDataPacketLen(packet, KYOSHO3_BIND_PACKET_SIZE);
#ifdef KYOSHO3_DEBUG
debug("P:");
for(uint8_t i=0;i<KYOSHO3_BIND_PACKET_SIZE;i++)
debug(" %02X",packet[i]);
debugln("");
#endif
return 2434;
}
else
{
//ID
memcpy(packet,&rx_tx_addr[1],3);
//Channels
for(uint8_t i=0;i<4;i++)
{
packet[3] >>= 2;
packet[3] |= Channel_data[i]<<6;
packet[4+i] = Channel_data[i]>>3;
}
//Checksum
packet[8] = packet[3];
for(uint8_t i=4;i<8;i++)
packet[8] += packet[i];
//Timing
phase ^= 0x01;
CYRF_WriteDataPacketLen(packet, KYOSHO3_PACKET_SIZE);
#ifdef KYOSHO3_DEBUG
debug("P:");
for(uint8_t i=0;i<KYOSHO3_PACKET_SIZE;i++)
debug(" %02X",packet[i]);
debugln("");
#endif
if(phase)
return 9047;
}
return 6957;
}
uint16_t KYOSHO3_callback()
{
if(IS_BIND_IN_PROGRESS)
{
if(--bind_counter==0)
BIND_DONE;
}
return KYOSHO3_send_packet();
}
void KYOSHO3_init()
{
//Config CYRF registers
for(uint8_t i = 0; i < sizeof(KYOSHO3_init_vals) / 2; i++)
CYRF_WriteRegister(pgm_read_byte_near(&KYOSHO3_init_vals[i][0]), pgm_read_byte_near(&KYOSHO3_init_vals[i][1]));
CYRF_WritePreamble(0x333304);
//Find a free even channel
CYRF_FindBestChannels(hopping_frequency,1,1,0x04,0x50, FIND_CHANNEL_EVEN);
hopping_frequency[0] = 0x12;
#ifdef KYOSHO3_FORCE_ID // data taken from TX dump
rx_tx_addr[1] = 0x01;
rx_tx_addr[2] = 0xAB;
rx_tx_addr[3] = 0x31;
hopping_frequency[0] = 0x04;
#endif
#ifdef KYOSHO3_DEBUG
debugln("ID: %02X %02X %02X",rx_tx_addr[1],rx_tx_addr[2],rx_tx_addr[3]);
debugln("RF CH: %02X",hopping_frequency[0]);
#endif
CYRF_ConfigRFChannel(hopping_frequency[0]);
bind_counter = 8217;
phase = 0;
}
#endif

View File

@@ -169,8 +169,7 @@ void LOSI_init()
{ {
LOSI_cyrf_init(); LOSI_cyrf_init();
CYRF_FindBestChannels(hopping_frequency, 1, 0, 0x07, 0x4F); // 0x07 and 0x4F are unknown limits, this routine resets the CRC Seed to 0 CYRF_FindBestChannels(hopping_frequency, 1, 0, 0x07, 0x4F, FIND_CHANNEL_ODD); // 0x07 and 0x4F are unknown limits, this routine resets the CRC Seed to 0
hopping_frequency[0] |= 1; // Only odd channels are used, integrated in CYRF code...
crc8 = 0; crc8 = 0;
crc8 = (uint16_t)LOSI_check(((rx_tx_addr[2]&0x0F) << 8) + rx_tx_addr[3]) >> 12; crc8 = (uint16_t)LOSI_check(((rx_tx_addr[2]&0x0F) << 8) + rx_tx_addr[3]) >> 12;

View File

@@ -3,7 +3,7 @@
3,FrskyD,D8,Cloned 3,FrskyD,D8,Cloned
4,Hisky,Hisky,HK310 4,Hisky,Hisky,HK310
5,V2x2,V2x2,JXD506,MR101 5,V2x2,V2x2,JXD506,MR101
6,DSM,DSM2_1F,DSM2_2F,DSMX_1F,DSMX_2F,AUTO,DSMR_1F 6,DSM,DSM2_1F,DSM2_2F,DSMX_1F,DSMX_2F,AUTO,DSMR_1F,DSMR,DSM2_SFC
7,Devo,8CH,10CH,12CH,6CH,7CH 7,Devo,8CH,10CH,12CH,6CH,7CH
8,YD717,YD717,SKYWLKR,SYMAX4,XINXUN,NIHUI 8,YD717,YD717,SKYWLKR,SYMAX4,XINXUN,NIHUI
9,KN,WLTOYS,FEILUN 9,KN,WLTOYS,FEILUN
@@ -94,3 +94,4 @@
95,BlueFly 95,BlueFly
96,BumbleB 96,BumbleB
97,SGF22 97,SGF22
98,Kyosho3

View File

@@ -109,6 +109,7 @@ const char STR_BLUEFLY[] ="BlueFly";
const char STR_BUMBLEB[] ="BumbleB"; const char STR_BUMBLEB[] ="BumbleB";
const char STR_SGF22[] ="SGF22"; const char STR_SGF22[] ="SGF22";
const char STR_EAZYRC[] ="EazyRC"; const char STR_EAZYRC[] ="EazyRC";
const char STR_KYOSHO3[] ="Kyosho3";
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";
@@ -121,9 +122,9 @@ const char STR_SUBTYPE_FRSKYD[] = "\x06""D8\0 ""Cloned";
const char STR_SUBTYPE_HISKY[] = "\x05""Std\0 ""HK310"; const char STR_SUBTYPE_HISKY[] = "\x05""Std\0 ""HK310";
const char STR_SUBTYPE_V2X2[] = "\x06""Std\0 ""JXD506""MR101\0"; const char STR_SUBTYPE_V2X2[] = "\x06""Std\0 ""JXD506""MR101\0";
#ifndef MULTI_EU #ifndef MULTI_EU
const char STR_SUBTYPE_DSM[] = "\x04""2 1F""2 2F""X 1F""X 2F""Auto""R 1F"; const char STR_SUBTYPE_DSM[] = "\x04""2 1F""2 2F""X 1F""X 2F""Auto""R 1F""2SFC";
#else #else
const char STR_SUBTYPE_DSM[] = "\x04""--->""--->""X 1F""X 2F""Auto""R 1F"; const char STR_SUBTYPE_DSM[] = "\x04""--->""--->""X 1F""X 2F""Auto""R 1F""----";
#endif #endif
const char STR_SUBTYPE_DEVO[] = "\x04""8ch\0""10ch""12ch""6ch\0""7ch\0"; 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 ";
@@ -171,6 +172,7 @@ const char STR_SUBTYPE_V761[] = "\x05""3ch\0 ""4ch\0 ""TOPRC";
const char STR_SUBTYPE_RLINK[] = "\x07""Surface""Air\0 ""DumboRC""RC4G\0 "; const char STR_SUBTYPE_RLINK[] = "\x07""Surface""Air\0 ""DumboRC""RC4G\0 ";
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_FUTABA[] = "\x05""SFHSS"; const char STR_SUBTYPE_FUTABA[] = "\x05""SFHSS";
const char STR_SUBTYPE_JJRC345[] = "\x08""JJRC345\0""SkyTmblr"; const char STR_SUBTYPE_JJRC345[] = "\x08""JJRC345\0""SkyTmblr";
const char STR_SUBTYPE_MOULDKG[] = "\x06""Analog""Digit\0"; const char STR_SUBTYPE_MOULDKG[] = "\x06""Analog""Digit\0";
@@ -258,7 +260,7 @@ const mm_protocol_definition multi_protocols[] = {
{PROTO_DM002, STR_DM002, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, DM002_init, DM002_callback }, {PROTO_DM002, STR_DM002, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, DM002_init, DM002_callback },
#endif #endif
#if defined(DSM_CYRF6936_INO) #if defined(DSM_CYRF6936_INO)
{PROTO_DSM, STR_DSM, STR_SUBTYPE_DSM, 6, OPTION_MAXTHR, 0, 1, SW_CYRF, DSM_init, DSM_callback }, {PROTO_DSM, STR_DSM, STR_SUBTYPE_DSM, 7, OPTION_MAXTHR, 0, 1, SW_CYRF, DSM_init, DSM_callback },
#endif #endif
#if defined(DSM_RX_CYRF6936_INO) #if defined(DSM_RX_CYRF6936_INO)
{PROTO_DSM_RX, STR_DSM_RX, STR_SUB_DSM_RX, DSMCPPM, OPTION_NONE, 0, 1, SW_CYRF, DSM_RX_init, DSM_RX_callback }, {PROTO_DSM_RX, STR_DSM_RX, STR_SUB_DSM_RX, DSMCPPM, OPTION_NONE, 0, 1, SW_CYRF, DSM_RX_init, DSM_RX_callback },
@@ -387,6 +389,9 @@ const mm_protocol_definition multi_protocols[] = {
#if defined(KYOSHO2_NRF24L01_INO) #if defined(KYOSHO2_NRF24L01_INO)
{PROTO_KYOSHO2, STR_KYOSHO2, STR_SUBTYPE_KYOSHO2, 1, OPTION_NONE, 0, 0, SW_NRF, KYOSHO2_init, KYOSHO2_callback }, {PROTO_KYOSHO2, STR_KYOSHO2, STR_SUBTYPE_KYOSHO2, 1, OPTION_NONE, 0, 0, SW_NRF, KYOSHO2_init, KYOSHO2_callback },
#endif #endif
#if defined(KYOSHO3_CYRF6936_INO)
{PROTO_KYOSHO3, STR_KYOSHO3, STR_SUBTYPE_KYOSHO3, 1, OPTION_NONE, 0, 0, SW_CYRF, KYOSHO3_init, KYOSHO3_callback },
#endif
#if defined(LOLI_NRF24L01_INO) #if defined(LOLI_NRF24L01_INO)
{PROTO_LOLI, STR_LOLI, NO_SUBTYPE, 0, OPTION_NONE, 1, 0, SW_NRF, LOLI_init, LOLI_callback }, {PROTO_LOLI, STR_LOLI, NO_SUBTYPE, 0, OPTION_NONE, 1, 0, SW_NRF, LOLI_init, LOLI_callback },
#endif #endif

View File

@@ -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 0 #define VERSION_PATCH_LEVEL 7
#define MODE_SERIAL 0 #define MODE_SERIAL 0
@@ -125,6 +125,7 @@ enum PROTOCOLS
PROTO_BLUEFLY = 95, // =>CC2500 & NRF24L01 PROTO_BLUEFLY = 95, // =>CC2500 & NRF24L01
PROTO_BUMBLEB = 96, // =>CC2500 & NRF24L01 PROTO_BUMBLEB = 96, // =>CC2500 & NRF24L01
PROTO_SGF22 = 97, // =>NRF24L01 PROTO_SGF22 = 97, // =>NRF24L01
PROTO_KYOSHO3 = 98, // =>CYRF6936
PROTO_NANORF = 126, // =>NRF24L01 PROTO_NANORF = 126, // =>NRF24L01
@@ -173,6 +174,7 @@ enum DSM
DSMX_2F = 3, DSMX_2F = 3,
DSM_AUTO = 4, DSM_AUTO = 4,
DSMR = 5, DSMR = 5,
DSM2_SFC = 6,
}; };
enum DSM_RX enum DSM_RX
{ {

View File

@@ -91,6 +91,8 @@ static void __attribute__((unused)) SGF22_send_packet()
static void __attribute__((unused)) SGF22_initialize_txid() static void __attribute__((unused)) SGF22_initialize_txid()
{ {
rx_tx_addr[2] &=0x7F;
rx_tx_addr[3] &=0x7F;
uint8_t val = (( (uint16_t) rx_tx_addr[2] << 8 ) | rx_tx_addr[3])%5; uint8_t val = (( (uint16_t) rx_tx_addr[2] << 8 ) | rx_tx_addr[3])%5;
const uint8_t hop[5][4] = const uint8_t hop[5][4] =
@@ -100,7 +102,7 @@ static void __attribute__((unused)) SGF22_initialize_txid()
{ 0x15, 0x34, 0x24, 0x44 }, { 0x15, 0x34, 0x24, 0x44 },
{ 0x18, 0x37, 0x27, 0x47 } }; { 0x18, 0x37, 0x27, 0x47 } };
memcpy(hopping_frequency, &hop[val], SGF22_RF_NUM_CHANNELS); memcpy(hopping_frequency, &hop[val], SGF22_RF_NUM_CHANNELS);
/*//Same code sze... /*//Same code sze...
hopping_frequency[0] = 0x0C + 3 * val; hopping_frequency[0] = 0x0C + 3 * val;
hopping_frequency[1] = hopping_frequency[0] + 0x1E; hopping_frequency[1] = hopping_frequency[0] + 0x1E;
@@ -110,8 +112,8 @@ static void __attribute__((unused)) SGF22_initialize_txid()
if(val ) hopping_frequency[3]++;*/ if(val ) hopping_frequency[3]++;*/
#ifdef FORCE_SGF22_ORIGINAL_ID #ifdef FORCE_SGF22_ORIGINAL_ID
rx_tx_addr[2] = 0x1F; rx_tx_addr[2] = 0x1F; // TX2: 27
rx_tx_addr[3] = 0x61; rx_tx_addr[3] = 0x61; // TX2: 51
memcpy(hopping_frequency,"\x15\x34\x24\x44", SGF22_RF_NUM_CHANNELS); //Original dump=>21=0x15,52=0x34,36=0x24,68=0x44 memcpy(hopping_frequency,"\x15\x34\x24\x44", SGF22_RF_NUM_CHANNELS); //Original dump=>21=0x15,52=0x34,36=0x24,68=0x44
#endif #endif
#if 0 #if 0
@@ -163,7 +165,7 @@ void SGF22_init()
SGF22_initialize_txid(); SGF22_initialize_txid();
SGF22_RF_init(); SGF22_RF_init();
bind_counter=SGF22_BIND_COUNT; bind_counter=SGF22_BIND_COUNT;
packet_sent = packet_count = 0x26; packet_sent = packet_count = 0x26; // TX2: 26
phase = 0; phase = 0;
} }

View File

@@ -241,7 +241,7 @@ void TRAXXAS_init()
//Read CYRF ID //Read CYRF ID
CYRF_GetMfgData(cyrfmfg_id); CYRF_GetMfgData(cyrfmfg_id);
//cyrfmfg_id[0]+=RX_num; // Not needed since the TX and RX have to match //cyrfmfg_id[0]+=RX_num; // Not needed since the TX and RX have to match
CYRF_FindBestChannels(hopping_frequency,1,1,0x02,0x21); CYRF_FindBestChannels(hopping_frequency,1,1,0x02,0x21, FIND_CHANNEL_ANY);
#ifdef TRAXXAS_FORCE_ID // data taken from TX dump #ifdef TRAXXAS_FORCE_ID // data taken from TX dump
cyrfmfg_id[0]=0x65; // CYRF MFG ID cyrfmfg_id[0]=0x65; // CYRF MFG ID
cyrfmfg_id[1]=0xE2; cyrfmfg_id[1]=0xE2;

View File

@@ -266,6 +266,7 @@
#undef E01X_CYRF6936_INO #undef E01X_CYRF6936_INO
#undef E129_CYRF6936_INO #undef E129_CYRF6936_INO
#undef J6PRO_CYRF6936_INO #undef J6PRO_CYRF6936_INO
#undef KYOSHO3_CYRF6936_INO
#undef LOSI_CYRF6936_INO #undef LOSI_CYRF6936_INO
#undef MLINK_CYRF6936_INO #undef MLINK_CYRF6936_INO
#undef TRAXXAS_CYRF6936_INO #undef TRAXXAS_CYRF6936_INO
@@ -377,6 +378,7 @@
#undef TRAXXAS_CYRF6936_INO #undef TRAXXAS_CYRF6936_INO
#undef EAZYRC_NRF24L01_INO #undef EAZYRC_NRF24L01_INO
#undef KYOSHO2_NRF24L01_INO #undef KYOSHO2_NRF24L01_INO
#undef KYOSHO3_CYRF6936_INO
#undef MOULDKG_NRF24L01_INO #undef MOULDKG_NRF24L01_INO
#undef SHENQI_NRF24L01_INO #undef SHENQI_NRF24L01_INO
#endif #endif
@@ -432,7 +434,6 @@
#undef OMP_CCNRF_INO #undef OMP_CCNRF_INO
#undef Q303_CCNRF_INO #undef Q303_CCNRF_INO
#undef Q90C_CCNRF_INO #undef Q90C_CCNRF_INO
#undef SLT_CCNRF_INO
#undef V911S_CCNRF_INO #undef V911S_CCNRF_INO
#endif #endif

View File

@@ -487,7 +487,7 @@ void WK_init()
CYRF_SetTxRxMode(TX_EN); CYRF_SetTxRxMode(TX_EN);
hopping_frequency_no=0; hopping_frequency_no=0;
CYRF_FindBestChannels(hopping_frequency, 3, 4, 4, 80); CYRF_FindBestChannels(hopping_frequency, 3, 4, 4, 80, FIND_CHANNEL_ANY);
CYRF_ConfigRFChannel(hopping_frequency[0]); CYRF_ConfigRFChannel(hopping_frequency[0]);
packet_count = 0; packet_count = 0;

View File

@@ -191,6 +191,7 @@
#define E01X_CYRF6936_INO #define E01X_CYRF6936_INO
#define E129_CYRF6936_INO #define E129_CYRF6936_INO
#define J6PRO_CYRF6936_INO #define J6PRO_CYRF6936_INO
#define KYOSHO3_CYRF6936_INO
#define LOSI_CYRF6936_INO //Need DSM to be enabled #define LOSI_CYRF6936_INO //Need DSM to be enabled
#define MLINK_CYRF6936_INO #define MLINK_CYRF6936_INO
#define SCORPIO_CYRF6936_INO #define SCORPIO_CYRF6936_INO
@@ -606,6 +607,7 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
DSMX_1F DSMX_1F
DSMX_2F DSMX_2F
DSMR DSMR
DSM2_SFC
PROTO_DSM_RX PROTO_DSM_RX
DSM_RX DSM_RX
DSM_CLONE DSM_CLONE
@@ -738,6 +740,8 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
KYOSHO_HYPE KYOSHO_HYPE
PROTO_KYOSHO2 PROTO_KYOSHO2
NONE NONE
PROTO_KYOSHO3
NONE
PROTO_LOLI PROTO_LOLI
NONE NONE
PROTO_LOSI PROTO_LOSI

View File

@@ -71,7 +71,11 @@ enum CYRF_PWR {
CYRF_PWR_DEFAULT, CYRF_PWR_DEFAULT,
}; };
enum FIND_CHANNEL {
FIND_CHANNEL_ANY = 0,
FIND_CHANNEL_EVEN = 1,
FIND_CHANNEL_ODD = 2,
};
/* SPI CYRF6936 */ /* SPI CYRF6936 */
/* /*

View File

@@ -75,7 +75,7 @@ CFlie|38|CFlie||||||||NRF24L01|
[CX10](Protocols_Details.md#CX10---12)|12|GREEN|BLUE|DM007|-|J3015_1|J3015_2|MK33041||NRF24L01|XN297 [CX10](Protocols_Details.md#CX10---12)|12|GREEN|BLUE|DM007|-|J3015_1|J3015_2|MK33041||NRF24L01|XN297
[Devo](Protocols_Details.md#DEVO---7)|7|Devo|8CH|10CH|12CH|6CH|7CH|||CYRF6936| [Devo](Protocols_Details.md#DEVO---7)|7|Devo|8CH|10CH|12CH|6CH|7CH|||CYRF6936|
[DM002](Protocols_Details.md#DM002---33)|33|||||||||NRF24L01|XN297 [DM002](Protocols_Details.md#DM002---33)|33|||||||||NRF24L01|XN297
[DSM](Protocols_Details.md#DSM---6)|6|DSM2_1F|DSM2_2F|DSMX_1F|DSMX_2F|AUTO|DSMR_1F|||CYRF6936| [DSM](Protocols_Details.md#DSM---6)|6|DSM2_1F|DSM2_2F|DSMX_1F|DSMX_2F|AUTO|DSMR_1F|DSM2SFC||CYRF6936|
[DSM_RX](Protocols_Details.md#DSM_RX---70)|70|Multi|CPPM|||||||CYRF6936| [DSM_RX](Protocols_Details.md#DSM_RX---70)|70|Multi|CPPM|||||||CYRF6936|
[E010R5](Protocols_Details.md#E010R5---81)|81|||||||||CYRF6936|RF2500 [E010R5](Protocols_Details.md#E010R5---81)|81|||||||||CYRF6936|RF2500
[E016H](Protocols_Details.md#E016H---85)|85|||||||||NRF24L01|XN297 [E016H](Protocols_Details.md#E016H---85)|85|||||||||NRF24L01|XN297
@@ -116,6 +116,7 @@ CFlie|38|CFlie||||||||NRF24L01|
[KN](Protocols_Details.md#KN---9)|9|WLTOYS|FEILUN|||||||NRF24L01| [KN](Protocols_Details.md#KN---9)|9|WLTOYS|FEILUN|||||||NRF24L01|
[Kyosho](Protocols_Details.md#Kyosho---73)|73|FHSS|Hype|||||||A7105| [Kyosho](Protocols_Details.md#Kyosho---73)|73|FHSS|Hype|||||||A7105|
[Kyosho2](Protocols_Details.md#Kyosho2---93)|93|KT-17||||||||NRF24L01| [Kyosho2](Protocols_Details.md#Kyosho2---93)|93|KT-17||||||||NRF24L01|
[Kyosho3](Protocols_Details.md#Kyosho3---98)|98|ASF||||||||CYRF6936|
[LOLI](Protocols_Details.md#LOLI---82)|82|||||||||NRF24L01| [LOLI](Protocols_Details.md#LOLI---82)|82|||||||||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
@@ -540,12 +541,23 @@ Surface DSMR receivers
**Only 22 IDs available**, use RX num to cycle through them. **Only 22 IDs available**, use RX num to cycle through them.
Telemetry enabled, extended limits available. Telemetry enabled, extended limits available and no channel mapping. Do not use DSM/AUTO to bind but DSM/R_1F instead.
CH1|CH2|CH3|CH4|CH5|CH6|CH7 CH1|CH2|CH3|CH4|CH5|CH6|CH7
---|---|---|---|---|---|--- ---|---|---|---|---|---|---
STR|THR|AUX1|AUX2|AUX3|AUX4|AUX5 STR|THR|AUX1|AUX2|AUX3|AUX4|AUX5
### Sub_protocol DSM2SFC - *6*
Surface DSM2 receivers, tested with a SR3100
Extended limits available and no channel mapping. Do not use DSM/AUTO to bind but DSM/2SFC instead.
Servo refresh rate 22/11ms is repurposed to the frame rates 16.5ms(22) and 11ms(11).
CH1|CH2|CH3
---|---|---
STR|THR|AUX1
## DSM_RX - *70* ## DSM_RX - *70*
The DSM receiver protocol enables master/slave trainning, separate access from 2 different radios to the same model,... The DSM receiver protocol enables master/slave trainning, separate access from 2 different radios to the same model,...
@@ -638,6 +650,17 @@ CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
---|---|---|---|---|---|---|---|---|----|----|---- ---|---|---|---|---|---|---|---|---|----|----|----
A|E|T|R|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12 A|E|T|R|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
## Kyosho3 - *98*
### Sub_protocol ASF - *0*
Surface protocol ASF. Models: Mini-Z.
Extended limits supported
CH1|CH2|CH3|CH4
---|---|---|---
STEERING|THROTTLE|CH3|CH4
## Losi - *89* ## Losi - *89*
TX: LSR-3000 TX: LSR-3000