diff --git a/Multiprotocol/Multi_Names.ino b/Multiprotocol/Multi_Names.ino index 8bb3847..b5905fe 100644 --- a/Multiprotocol/Multi_Names.ino +++ b/Multiprotocol/Multi_Names.ino @@ -125,7 +125,7 @@ const char STR_SUBTYPE_GD00X[] = "\x05""GD_V1""GD_V2"; const char STR_SUBTYPE_REDPINE[] = "\x04""Fast""Slow"; const char STR_SUBTYPE_POTENSIC[] = "\x03""A20"; const char STR_SUBTYPE_ZSX[] = "\x07""280JJRC"; -const char STR_SUBTYPE_FLYZONE[] = "\x05""FZ410""FZ8xx"; +const char STR_SUBTYPE_FLYZONE[] = "\x05""FZ410"; const char STR_SUBTYPE_FX816[] = "\x03""P38"; const char STR_SUBTYPE_XN297DUMP[] = "\x07""250Kbps""1Mbps\0 ""2Mbps\0 ""Auto\0 ""NRF\0 "; const char STR_SUBTYPE_ESKY150[] = "\x03""4ch""7ch"; @@ -225,7 +225,7 @@ const mm_protocol_definition multi_protocols[] = { {PROTO_AFHDS2A_RX, STR_AFHDS2A_RX,0, NO_SUBTYPE, OPTION_NONE }, #endif #if defined(FLYZONE_A7105_INO) - {PROTO_FLYZONE, STR_FLYZONE, 2, STR_SUBTYPE_FLYZONE, OPTION_NONE }, + {PROTO_FLYZONE, STR_FLYZONE, 1, STR_SUBTYPE_FLYZONE, OPTION_NONE }, #endif #if defined(FQ777_NRF24L01_INO) {PROTO_FQ777, STR_FQ777, 0, NO_SUBTYPE, OPTION_NONE }, diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index a95f791..255a0b2 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -19,7 +19,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 3 #define VERSION_REVISION 1 -#define VERSION_PATCH_LEVEL 46 +#define VERSION_PATCH_LEVEL 47 //****************** // Protocols diff --git a/Multiprotocol/RadioLink_cc2500.ino b/Multiprotocol/RadioLink_cc2500.ino index 45ca8a6..d5275cd 100644 --- a/Multiprotocol/RadioLink_cc2500.ino +++ b/Multiprotocol/RadioLink_cc2500.ino @@ -31,6 +31,50 @@ enum { RLINK_RX2 = 0x02, }; +const PROGMEM uint8_t RLINK_hopping[][8] = { + /* 00 */ { 0x1F, 0x89, 0x25, 0x06, 0x4E, 0xBD, 0x3A, 0xC7 }, + /* 01 */ { 0xBC, 0xFE, 0x59, 0x84, 0x37, 0xA1, 0xD0, 0x62 } +}; + +static void __attribute__((unused)) RLINK_load_hopp(uint8_t num) +{ + uint8_t inc=3*(rx_tx_addr[0]&3); + + for (uint8_t i = 0; i < RLINK_HOP>>1; i++) + { + uint8_t val=pgm_read_byte_near(&RLINK_hopping[num][i]); + hopping_frequency[ i<<1 ]=12*(val>>4 )+inc; + hopping_frequency[(i<<1)+1]=12*(val&0x0F)+inc; + } + + // replace one of the channel randomely + rf_ch_num=random(0xfefefefe)%0x11; // 0x00..0x10 + if(inc==9) inc=6; // frequency exception + hopping_frequency[rf_ch_num]=12*16+inc; +} + +static void __attribute__((unused)) RLINK_init() +{ + // channels order depend on ID and currently unknown... + #ifdef RLINK_FORCE_ID + //surface RC6GS + memcpy(rx_tx_addr,"\x3A\x99\x22\x3A",RLINK_TX_ID_LEN); + RLINK_load_hopp(0); + //air T8FB + //memcpy(rx_tx_addr,"\xFC\x11\x0D\x20",RLINK_TX_ID_LEN); + //RLINK_load_hopp(1); + #endif + + debug("ID:"); + for(uint8_t i=0;i3?0x03:0x01; // packet type: 0x01 normal, 0x03 request telemetry + if(packet_count>3) + packet[1] |= 0x02; // 0x02 telemetry request flag // ID memcpy(&packet[2],rx_tx_addr,RLINK_TX_ID_LEN); @@ -142,7 +157,7 @@ static void __attribute__((unused)) RLINK_TIMING_RFSEND_packet() packet[29]= pseudo >> 8; packet[30]= 0x00; // unknown packet[31]= 0x00; // unknown - packet[32]= rf_ch_num; // value equal to 0xC6 in the RF table + packet[32]= rf_ch_num; // index of value changed in the RF table // check uint8_t sum=0; @@ -157,13 +172,14 @@ static void __attribute__((unused)) RLINK_TIMING_RFSEND_packet() packet_count++; if(packet_count>5) packet_count=0; - //debug("P(%02X):",hopping_frequency[pseudo & 0x0F]); - //for(uint8_t i=0;i= 2000) {//1 telemetry packet every 100ms pps_timer = millis(); - pps_counter*=5; + if(pps_counter<20) + pps_counter*=5; + else + pps_counter=100; debugln("%d pps", pps_counter); - TX_LQI = pps_counter; //Max=100% + TX_LQI = pps_counter; //0..100% pps_counter = 0; } CC2500_SetTxRxMode(TX_EN); diff --git a/Protocols_Details.md b/Protocols_Details.md index 830473c..a3fbce0 100644 --- a/Protocols_Details.md +++ b/Protocols_Details.md @@ -117,7 +117,7 @@ CFlie|38|CFlie||||||||NRF24L01| [Q2X2](Protocols_Details.md#Q2X2---29)|29|Q222|Q242|Q282||||||NRF24L01| [Q303](Protocols_Details.md#Q303---31)|31|Q303|CX35|CX10D|CX10WD|||||NRF24L01|XN297 [Q90C](Protocols_Details.md#Q90C---72)|72|Q90C*||||||||NRF24L01|XN297 -[RadioLink](Protocols_Details.md#RadioLink---74)|74|Surface||||||||CC2500| +[RadioLink](Protocols_Details.md#RadioLink---74)|74|Surface|Air|||||||CC2500| [Redpine](Protocols_Details.md#Redpine---50)|50|FAST|SLOW|||||||NRF24L01| [Scanner](Protocols_Details.md#Scanner---54)|54|||||||||CC2500| [SFHSS](Protocols_Details.md#SFHSS---21)|21|SFHSS||||||||CC2500| @@ -558,7 +558,7 @@ CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|FS_CH1|FS_CH2|FS_CH3|FS_CH4|FS_CH5|FS_CH6|FS_CH7 FS=FailSafe ### Sub_protocol Surface - *0* -Surface protocol. TXs: RC4GS,RC6GS. Compatible RXs:R7FG(Std),R6FG,R6F,R8EF,R8FM,R8F,R4FGM +Surface protocol. TXs: RC4GS,RC6GS. Compatible RXs:R7FG(Std),R6FG,R6F,R8EF,R8FM,R8F,R4FGM and more **Only 1 ID for now** @@ -566,6 +566,13 @@ CH1=Steering, CH2=Throttle, CH8=Gyro gain Telemetry: RX_RSSI (for the original value add -256), TX_RSSI, TX_QLY (0..100%), A1=RX_Batt, A2=Batt +### Sub_protocol Air - *1* +Surface protocol. TXs: T8FB,. Compatible RXs:R8EF,R8FM,R4FG,R4F and more + +**Only 1 ID for now** + +Telemetry: RX_RSSI (for the original value add -256), TX_RSSI, TX_QLY (0..100%) + ## SFHSS - *21* Models: Futaba RXs and XK models.