diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index 8e8a631..91398aa 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -81,6 +81,7 @@ enum PROTOCOLS PROTO_ZSX = 52, // =>NRF24L01 PROTO_FLYZONE = 53, // =>A7105 PROTO_SCANNER = 54, // =>CC2500 + PROTO_FRSKYX_RX = 55, // =>CC2500 PROTO_XN297DUMP = 63, // =>NRF24L01 }; @@ -288,6 +289,11 @@ enum TRAXXAS { RX6519 = 0, }; +enum FRSKYX_RX +{ + FRSKYX_FCC = 0, + FRSKYX_LBT +}; #define NONE 0 #define P_HIGH 1 @@ -321,6 +327,7 @@ enum MultiPacketTypes MULTI_TELEMETRY_HITEC = 10, MULTI_TELEMETRY_SCANNER = 11, MULTI_TELEMETRY_AFHDS2A_AC = 12, + MULTI_TELEMETRY_CHANNELS = 13, }; // Macros @@ -640,6 +647,7 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p -- ZSX 52 FLYZONE 53 SCANNER 54 + FRSKYX_RX 55 BindBit=> 0x80 1=Bind/0=No AutoBindBit=> 0x40 1=Yes /0=No RangeCheck=> 0x20 1=Yes /0=No @@ -781,6 +789,9 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p -- RED_SLOW 1 sub_protocol==TRAXXAS RX6519 0 + sub_protocol==FRSKYX_RX + FCC 0 + LBT 1 Power value => 0x80 0=High/1=Low Stream[3] = option_protocol; @@ -899,4 +910,8 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p -- data[0] = RSSI value data[1-28] telemetry data + Type 0x0D RX channels forwarding + length: 22 + data[0-21] packed channels data, 16 channels, 11 bit per channel, msb first + */ diff --git a/Multiprotocol/Multiprotocol.ino b/Multiprotocol/Multiprotocol.ino index 8c33535..91156d1 100644 --- a/Multiprotocol/Multiprotocol.ino +++ b/Multiprotocol/Multiprotocol.ino @@ -647,7 +647,7 @@ uint8_t Update_All() update_led_status(); #if defined(TELEMETRY) #if ( !( defined(MULTI_TELEMETRY) || defined(MULTI_STATUS) ) ) - if( (protocol == PROTO_SCANNER) || (protocol==PROTO_FRSKYD) || (protocol==PROTO_BAYANG) || (protocol==PROTO_NCC1701) || (protocol==PROTO_BUGS) || (protocol==PROTO_BUGSMINI) || (protocol==PROTO_HUBSAN) || (protocol==PROTO_AFHDS2A) || (protocol==PROTO_FRSKYX) || (protocol==PROTO_DSM) || (protocol==PROTO_CABELL) || (protocol==PROTO_HITEC)) + if( (protocol == PROTO_FRSKYX_RX) || (protocol==PROTO_FRSKYX)(protocol == PROTO_SCANNER) || (protocol==PROTO_FRSKYD) || (protocol==PROTO_BAYANG) || (protocol==PROTO_NCC1701) || (protocol==PROTO_BUGS) || (protocol==PROTO_BUGSMINI) || (protocol==PROTO_HUBSAN) || (protocol==PROTO_AFHDS2A) || (protocol==PROTO_FRSKYX) || (protocol==PROTO_DSM) || (protocol==PROTO_CABELL) || (protocol==PROTO_HITEC)) #endif TelemetryUpdate(); #endif @@ -1028,6 +1028,14 @@ static void protocol_init() remote_callback = Scanner_callback; break; #endif + #if defined(SCANNER_CC2500_INO) + case PROTO_FRSKYX_RX: + PE1_off; + PE2_on; //antenna RF2 + next_callback = initFrSkyX_Rx(); + remote_callback = FrSkyX_Rx_callback; + break; + #endif #endif #ifdef CYRF6936_INSTALLED #if defined(DSM_CYRF6936_INO) diff --git a/Multiprotocol/Telemetry.ino b/Multiprotocol/Telemetry.ino index 18a7e6c..7a486e2 100644 --- a/Multiprotocol/Telemetry.ino +++ b/Multiprotocol/Telemetry.ino @@ -1019,6 +1019,16 @@ void TelemetryUpdate() } #endif + #if defined FRSKYX_RX_TELEMETRY + if (telemetry_link && protocol == PROTO_FRSKYX_RX) + { + // TODO + //channels_frame(); + telemetry_link = 0; + return; + } + #endif + if((telemetry_link & 1 )&& protocol != PROTO_FRSKYX) { // FrSkyD + Hubsan + AFHDS2A + Bayang + Cabell + Hitec + Bugs + BugsMini + NCC1701 frsky_link_frame(); diff --git a/Multiprotocol/_Config.h b/Multiprotocol/_Config.h index a69be57..168601f 100644 --- a/Multiprotocol/_Config.h +++ b/Multiprotocol/_Config.h @@ -174,6 +174,7 @@ #define FRSKYD_CC2500_INO #define FRSKYV_CC2500_INO #define FRSKYX_CC2500_INO +#define FRSKYX_RX_CC2500_INO #define HITEC_CC2500_INO #define SCANNER_CC2500_INO #define SFHSS_CC2500_INO @@ -296,6 +297,7 @@ #define HITEC_HUB_TELEMETRY // Use FrSkyD Hub format to send basic telemetry to the radios which can decode it like er9x, ersky9x and OpenTX #define HITEC_FW_TELEMETRY // Under development: Forward received telemetry packets to be decoded by ersky9x and OpenTX #define SCANNER_TELEMETRY // Forward spectrum scanner data to TX +#define FRSKYX_RX_TELEMETRY // Forward channels data to TX //SPORT_POLLING is an implementation of the same polling routine as XJT module for sport telemetry bidirectional communication. //This is useful for passing sport control frames from TX to RX(ex: changing Betaflight PID or VTX channels on the fly using LUA scripts with OpentX). @@ -547,6 +549,9 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= { CH_8 EU_16 EU_8 + PROTO_FRSKYX_RX + FCC + LBT PROTO_FY326 FY326 FY319