mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-13 02:07:53 +00:00
Add skeleton for FrSkyX receiver protocol
This commit is contained in:
parent
078dc2ab17
commit
174e19bee2
@ -81,6 +81,7 @@ enum PROTOCOLS
|
|||||||
PROTO_ZSX = 52, // =>NRF24L01
|
PROTO_ZSX = 52, // =>NRF24L01
|
||||||
PROTO_FLYZONE = 53, // =>A7105
|
PROTO_FLYZONE = 53, // =>A7105
|
||||||
PROTO_SCANNER = 54, // =>CC2500
|
PROTO_SCANNER = 54, // =>CC2500
|
||||||
|
PROTO_FRSKYX_RX = 55, // =>CC2500
|
||||||
PROTO_XN297DUMP = 63, // =>NRF24L01
|
PROTO_XN297DUMP = 63, // =>NRF24L01
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -288,6 +289,11 @@ enum TRAXXAS
|
|||||||
{
|
{
|
||||||
RX6519 = 0,
|
RX6519 = 0,
|
||||||
};
|
};
|
||||||
|
enum FRSKYX_RX
|
||||||
|
{
|
||||||
|
FRSKYX_FCC = 0,
|
||||||
|
FRSKYX_LBT
|
||||||
|
};
|
||||||
|
|
||||||
#define NONE 0
|
#define NONE 0
|
||||||
#define P_HIGH 1
|
#define P_HIGH 1
|
||||||
@ -321,6 +327,7 @@ enum MultiPacketTypes
|
|||||||
MULTI_TELEMETRY_HITEC = 10,
|
MULTI_TELEMETRY_HITEC = 10,
|
||||||
MULTI_TELEMETRY_SCANNER = 11,
|
MULTI_TELEMETRY_SCANNER = 11,
|
||||||
MULTI_TELEMETRY_AFHDS2A_AC = 12,
|
MULTI_TELEMETRY_AFHDS2A_AC = 12,
|
||||||
|
MULTI_TELEMETRY_CHANNELS = 13,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Macros
|
// Macros
|
||||||
@ -640,6 +647,7 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
|
|||||||
ZSX 52
|
ZSX 52
|
||||||
FLYZONE 53
|
FLYZONE 53
|
||||||
SCANNER 54
|
SCANNER 54
|
||||||
|
FRSKYX_RX 55
|
||||||
BindBit=> 0x80 1=Bind/0=No
|
BindBit=> 0x80 1=Bind/0=No
|
||||||
AutoBindBit=> 0x40 1=Yes /0=No
|
AutoBindBit=> 0x40 1=Yes /0=No
|
||||||
RangeCheck=> 0x20 1=Yes /0=No
|
RangeCheck=> 0x20 1=Yes /0=No
|
||||||
@ -781,6 +789,9 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
|
|||||||
RED_SLOW 1
|
RED_SLOW 1
|
||||||
sub_protocol==TRAXXAS
|
sub_protocol==TRAXXAS
|
||||||
RX6519 0
|
RX6519 0
|
||||||
|
sub_protocol==FRSKYX_RX
|
||||||
|
FCC 0
|
||||||
|
LBT 1
|
||||||
|
|
||||||
Power value => 0x80 0=High/1=Low
|
Power value => 0x80 0=High/1=Low
|
||||||
Stream[3] = option_protocol;
|
Stream[3] = option_protocol;
|
||||||
@ -899,4 +910,8 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
|
|||||||
data[0] = RSSI value
|
data[0] = RSSI value
|
||||||
data[1-28] telemetry data
|
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
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@ -647,7 +647,7 @@ uint8_t Update_All()
|
|||||||
update_led_status();
|
update_led_status();
|
||||||
#if defined(TELEMETRY)
|
#if defined(TELEMETRY)
|
||||||
#if ( !( defined(MULTI_TELEMETRY) || defined(MULTI_STATUS) ) )
|
#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
|
#endif
|
||||||
TelemetryUpdate();
|
TelemetryUpdate();
|
||||||
#endif
|
#endif
|
||||||
@ -1028,6 +1028,14 @@ static void protocol_init()
|
|||||||
remote_callback = Scanner_callback;
|
remote_callback = Scanner_callback;
|
||||||
break;
|
break;
|
||||||
#endif
|
#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
|
#endif
|
||||||
#ifdef CYRF6936_INSTALLED
|
#ifdef CYRF6936_INSTALLED
|
||||||
#if defined(DSM_CYRF6936_INO)
|
#if defined(DSM_CYRF6936_INO)
|
||||||
|
@ -1019,6 +1019,16 @@ void TelemetryUpdate()
|
|||||||
}
|
}
|
||||||
#endif
|
#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)
|
if((telemetry_link & 1 )&& protocol != PROTO_FRSKYX)
|
||||||
{ // FrSkyD + Hubsan + AFHDS2A + Bayang + Cabell + Hitec + Bugs + BugsMini + NCC1701
|
{ // FrSkyD + Hubsan + AFHDS2A + Bayang + Cabell + Hitec + Bugs + BugsMini + NCC1701
|
||||||
frsky_link_frame();
|
frsky_link_frame();
|
||||||
|
@ -174,6 +174,7 @@
|
|||||||
#define FRSKYD_CC2500_INO
|
#define FRSKYD_CC2500_INO
|
||||||
#define FRSKYV_CC2500_INO
|
#define FRSKYV_CC2500_INO
|
||||||
#define FRSKYX_CC2500_INO
|
#define FRSKYX_CC2500_INO
|
||||||
|
#define FRSKYX_RX_CC2500_INO
|
||||||
#define HITEC_CC2500_INO
|
#define HITEC_CC2500_INO
|
||||||
#define SCANNER_CC2500_INO
|
#define SCANNER_CC2500_INO
|
||||||
#define SFHSS_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_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 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 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.
|
//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).
|
//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
|
CH_8
|
||||||
EU_16
|
EU_16
|
||||||
EU_8
|
EU_8
|
||||||
|
PROTO_FRSKYX_RX
|
||||||
|
FCC
|
||||||
|
LBT
|
||||||
PROTO_FY326
|
PROTO_FY326
|
||||||
FY326
|
FY326
|
||||||
FY319
|
FY319
|
||||||
|
Loading…
x
Reference in New Issue
Block a user