WFLY: renamed WFLYRF to WFLY2

This commit is contained in:
Pascal Langer 2020-12-13 23:15:43 +01:00
parent ef5d9cb6b3
commit 1bb059c2a2
9 changed files with 90 additions and 88 deletions

View File

@ -176,3 +176,4 @@
8,4,YD717,NiHui,1,Flip,Light,Pict,Video,HLess
52,0,ZSX,280,1,Light
78,0,M-Link,Std,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12,CH13,CH14,CH15,CH16
79,0,WFLY2,RF20x,0,CH5,CH6,CH7,CH8,CH9,CH10

View File

@ -27,7 +27,7 @@ void A7105_WriteData(uint8_t len, uint8_t channel)
for (i = 0; i < len; i++)
SPI_Write(packet[i]);
A7105_CSN_on;
if(protocol!=PROTO_WFLYRF)
if(protocol!=PROTO_WFLY2)
{
if(!(protocol==PROTO_FLYSKY || protocol==PROTO_KYOSHO))
{
@ -210,9 +210,9 @@ void A7105_AdjustLOBaseFreq(uint8_t cmd)
offset=(int16_t)FORCE_KYOSHO_TUNING;
#endif
break;
case PROTO_WFLYRF:
#ifdef FORCE_WFLYRF_TUNING
offset=(int16_t)FORCE_WFLYRF_TUNING;
case PROTO_WFLY2:
#ifdef FORCE_WFLY2_TUNING
offset=(int16_t)FORCE_WFLY2_TUNING;
#endif
break;
case PROTO_AFHDS2A:
@ -333,8 +333,8 @@ const uint8_t PROGMEM KYOSHO_HYPE_A7105_regs[] = {
0x01, 0x0f // 30 - 31
};
#endif
#ifdef WFLYRF_A7105_INO //A7106 values
const uint8_t PROGMEM WFLYRF_A7105_regs[] = {
#ifdef WFLY2_A7105_INO //A7106 values
const uint8_t PROGMEM WFLY2_A7105_regs[] = {
0xff, 0x62, 0xff, 0x1F, 0x40, 0xff, 0xff ,0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x05, 0x00, 0x64, // 00 - 0f Changes: 0B:19->33, 0C:01,33
0x9e, 0x4b, 0x00, 0x02, 0x16, 0x2b, 0x12, 0x40, 0x62, 0x80, 0x80, 0x00, 0x0a, 0x32, 0x03, 0x0f, // 10 - 1f 1C:4A->0A
0x12, 0x00, 0x00, 0xff, 0x00, 0x00, 0x23, 0x70, 0x15, 0x47, 0x80, 0x03, 0x01, 0x45, 0x18, 0x00, // 20 - 2f 2B:77->03, 2E:19->18
@ -349,10 +349,10 @@ void A7105_Init(void)
uint8_t *A7105_Regs=0;
uint8_t vco_calibration0, vco_calibration1;
#ifdef WFLYRF_A7105_INO
if(protocol==PROTO_WFLYRF)
#ifdef WFLY2_A7105_INO
if(protocol==PROTO_WFLY2)
{
A7105_Regs=(uint8_t*)WFLYRF_A7105_regs;
A7105_Regs=(uint8_t*)WFLY2_A7105_regs;
}
else
#endif
@ -465,7 +465,7 @@ void A7105_Init(void)
while(A7105_ReadReg(A7105_02_CALC)); // Wait for calibration to end
vco_calibration1 = A7105_ReadReg(A7105_25_VCO_SBCAL_I);
if(protocol==PROTO_BUGS || protocol==PROTO_WFLYRF)
if(protocol==PROTO_BUGS || protocol==PROTO_WFLY2)
A7105_SetVCOBand(vco_calibration0 & 0x07, vco_calibration1 & 0x07); // Set calibration band value to best match
else
if(protocol!=PROTO_HUBSAN)

View File

@ -59,7 +59,8 @@ const char STR_H8_3D[] ="H8 3D";
const char STR_CORONA[] ="Corona";
const char STR_CFLIE[] ="CFlie";
const char STR_HITEC[] ="Hitec";
const char STR_WFLY[] ="WFly";
const char STR_WFLY[] ="WFLY";
const char STR_WFLY2[] ="WFLY2";
const char STR_BUGS[] ="Bugs";
const char STR_BUGSMINI[] ="BugMini";
const char STR_TRAXXAS[] ="Traxxas";
@ -141,7 +142,7 @@ const char STR_SUBTYPE_PROPEL[] = "\x04""74-Z";
const char STR_SUBTYPE_FRSKY_RX[] = "\x07""RX\0 ""CloneTX";
const char STR_SUBTYPE_FRSKYL[] = "\x08""LR12\0 ""LR12 6ch";
const char STR_SUBTYPE_WFLY[] = "\x05""WFR0x";
const char STR_SUBTYPE_WFLYRF[] = "\x05""RF20x";
const char STR_SUBTYPE_WFLY2[] = "\x05""RF20x";
const char STR_SUBTYPE_HOTT[] = "\x07""Sync\0 ""No_Sync";
const char STR_SUBTYPE_PELIKAN[] = "\x04""Pro\0""Lite";
const char STR_SUBTYPE_V761[] = "\x03""3ch""4ch";
@ -385,8 +386,8 @@ const mm_protocol_definition multi_protocols[] = {
#if defined(WFLY_CYRF6936_INO)
{PROTO_WFLY, STR_WFLY, 1, STR_SUBTYPE_WFLY, OPTION_NONE },
#endif
#if defined(WFLYRF_A7105_INO)
{PROTO_WFLYRF, STR_WFLY, 1, STR_SUBTYPE_WFLYRF, OPTION_NONE },
#if defined(WFLY2_A7105_INO)
{PROTO_WFLY2, STR_WFLY2, 1, STR_SUBTYPE_WFLY2, OPTION_NONE },
#endif
#if defined(XK_NRF24L01_INO)
{PROTO_XK, STR_XK , 2, STR_SUBTYPE_XK, OPTION_RFTUNE },

View File

@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_REVISION 1
#define VERSION_PATCH_LEVEL 82
#define VERSION_PATCH_LEVEL 83
//******************
// Protocols
@ -104,7 +104,7 @@ enum PROTOCOLS
PROTO_REALACC = 76, // =>NRF24L01
PROTO_OMP = 77, // =>CC2500 & NRF24L01
PROTO_MLINK = 78, // =>CYRF6936
PROTO_WFLYRF = 79, // =>A7105
PROTO_WFLY2 = 79, // =>A7105
PROTO_NANORF = 126, // =>NRF24L01
PROTO_TEST = 127, // =>CC2500
@ -837,7 +837,7 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
REALACC 76
OMP 77
MLINK 78
WFLYRF 79
WFLY2 79
BindBit=> 0x80 1=Bind/0=No
AutoBindBit=> 0x40 1=Yes /0=No
RangeCheck=> 0x20 1=Yes /0=No

View File

@ -821,7 +821,7 @@ bool Update_All()
update_led_status();
#if defined(TELEMETRY)
#if ( !( defined(MULTI_TELEMETRY) || defined(MULTI_STATUS) ) )
if((protocol == PROTO_BAYANG_RX) || (protocol == PROTO_AFHDS2A_RX) || (protocol == PROTO_FRSKY_RX) || (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_FRSKYX2) || (protocol==PROTO_DSM) || (protocol==PROTO_CABELL) || (protocol==PROTO_HITEC) || (protocol==PROTO_HOTT) || (protocol==PROTO_PROPEL) || (protocol==PROTO_OMP) || (protocol==PROTO_DEVO) || (protocol==PROTO_DSM_RX) || (protocol==PROTO_FRSKY_R9) || (protocol==PROTO_RLINK) || (protocol==PROTO_WFLYRF))
if((protocol == PROTO_BAYANG_RX) || (protocol == PROTO_AFHDS2A_RX) || (protocol == PROTO_FRSKY_RX) || (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_FRSKYX2) || (protocol==PROTO_DSM) || (protocol==PROTO_CABELL) || (protocol==PROTO_HITEC) || (protocol==PROTO_HOTT) || (protocol==PROTO_PROPEL) || (protocol==PROTO_OMP) || (protocol==PROTO_DEVO) || (protocol==PROTO_DSM_RX) || (protocol==PROTO_FRSKY_R9) || (protocol==PROTO_RLINK) || (protocol==PROTO_WFLY2))
#endif
if(IS_DISABLE_TELEM_off)
TelemetryUpdate();
@ -1196,11 +1196,11 @@ static void protocol_init()
remote_callback = ReadKyosho;
break;
#endif
#if defined(WFLYRF_A7105_INO)
case PROTO_WFLYRF:
#if defined(WFLY2_A7105_INO)
case PROTO_WFLY2:
PE1_off; //antenna RF1
next_callback = initWFLYRF();
remote_callback = ReadWFLYRF;
next_callback = initWFLY2();
remote_callback = ReadWFLY2;
break;
#endif
#endif
@ -2290,7 +2290,7 @@ void pollBoot()
#if defined(TELEMETRY)
void PPM_Telemetry_serial_init()
{
if( (protocol==PROTO_FRSKYD) || (protocol==PROTO_HUBSAN) || (protocol==PROTO_AFHDS2A) || (protocol==PROTO_BAYANG)|| (protocol==PROTO_NCC1701) || (protocol==PROTO_CABELL) || (protocol==PROTO_HITEC) || (protocol==PROTO_BUGS) || (protocol==PROTO_BUGSMINI) || (protocol==PROTO_PROPEL) || (protocol==PROTO_OMP) || (protocol==PROTO_RLINK) || (protocol==PROTO_WFLYRF)
if( (protocol==PROTO_FRSKYD) || (protocol==PROTO_HUBSAN) || (protocol==PROTO_AFHDS2A) || (protocol==PROTO_BAYANG)|| (protocol==PROTO_NCC1701) || (protocol==PROTO_CABELL) || (protocol==PROTO_HITEC) || (protocol==PROTO_BUGS) || (protocol==PROTO_BUGSMINI) || (protocol==PROTO_PROPEL) || (protocol==PROTO_OMP) || (protocol==PROTO_RLINK) || (protocol==PROTO_WFLY2)
#ifdef TELEMETRY_FRSKYX_TO_FRSKYD
|| (protocol==PROTO_FRSKYX) || (protocol==PROTO_FRSKYX2)
#endif

View File

@ -531,7 +531,7 @@ void frsky_link_frame()
telemetry_link |= 2 ; // Send hub if available
}
else
{//PROTO_HUBSAN, PROTO_AFHDS2A, PROTO_BAYANG, PROTO_NCC1701, PROTO_CABELL, PROTO_HITEC, PROTO_BUGS, PROTO_BUGSMINI, PROTO_FRSKYX, PROTO_FRSKYX2, PROTO_PROPEL, PROTO_DEVO, PROTO_RLINK, PROTO_OMP, PROTO_WFLYRF
{//PROTO_HUBSAN, PROTO_AFHDS2A, PROTO_BAYANG, PROTO_NCC1701, PROTO_CABELL, PROTO_HITEC, PROTO_BUGS, PROTO_BUGSMINI, PROTO_FRSKYX, PROTO_FRSKYX2, PROTO_PROPEL, PROTO_DEVO, PROTO_RLINK, PROTO_OMP, PROTO_WFLY2
frame[1] = v_lipo1;
frame[2] = v_lipo2;
frame[3] = RX_RSSI;

View File

@ -160,9 +160,9 @@
#error "The Kyosho forced frequency tuning value is outside of the range -300..300."
#endif
#endif
#ifdef FORCE_WFLYRF_TUNING
#if ( FORCE_WFLYRF_TUNING < -300 ) || ( FORCE_WFLYRF_TUNING > 300 )
#error "The WFLYRF forced frequency tuning value is outside of the range -300..300."
#ifdef FORCE_WFLY2_TUNING
#if ( FORCE_WFLY2_TUNING < -300 ) || ( FORCE_WFLY2_TUNING > 300 )
#error "The WFLY2 forced frequency tuning value is outside of the range -300..300."
#endif
#endif
@ -182,8 +182,8 @@
#ifndef FORCE_KYOSHO_TUNING
#define FORCE_KYOSHO_TUNING 0
#endif
#ifndef FORCE_WFLYRF_TUNING
#define FORCE_WFLYRF_TUNING 0
#ifndef FORCE_WFLY2_TUNING
#define FORCE_WFLY2_TUNING 0
#endif
#ifndef FORCE_HUBSAN_TUNING
#define FORCE_HUBSAN_TUNING 0
@ -235,7 +235,7 @@
#undef HUBSAN_A7105_INO
#undef KYOSHO_A7105_INO
#undef PELIKAN_A7105_INO
#undef WFLYRF_A7105_INO
#undef WFLY2_A7105_INO
#endif
#ifndef CYRF6936_INSTALLED
#undef DEVO_CYRF6936_INO
@ -355,7 +355,7 @@
#undef RLINK_HUB_TELEMETRY
#undef DSM_RX_CYRF6936_INO
#undef DSM_FWD_PGM
#undef WFLYRF_HUB_TELEMETRY
#undef WFLY2_HUB_TELEMETRY
#else
#if defined(MULTI_TELEMETRY) && defined(MULTI_STATUS)
#error You should choose either MULTI_TELEMETRY or MULTI_STATUS but not both.
@ -427,10 +427,10 @@
#if not defined(HOTT_CC2500_INO)
#undef HOTT_FW_TELEMETRY
#endif
#if not defined(WFLYRF_A7105_INO)
#undef WFLYRF_HUB_TELEMETRY
#if not defined(WFLY2_A7105_INO)
#undef WFLY2_HUB_TELEMETRY
#endif
#if not defined(HOTT_FW_TELEMETRY) && not defined(DSM_TELEMETRY) && not defined(SPORT_TELEMETRY) && not defined(HUB_TELEMETRY) && not defined(HUBSAN_HUB_TELEMETRY) && not defined(BUGS_HUB_TELEMETRY) && not defined(NCC1701_HUB_TELEMETRY) && not defined(BAYANG_HUB_TELEMETRY) && not defined(CABELL_HUB_TELEMETRY) && not defined(RLINK_HUB_TELEMETRY) && not defined(AFHDS2A_HUB_TELEMETRY) && not defined(AFHDS2A_FW_TELEMETRY) && not defined(MULTI_TELEMETRY) && not defined(MULTI_STATUS) && not defined(HITEC_HUB_TELEMETRY) && not defined(HITEC_FW_TELEMETRY) && not defined(SCANNER_TELEMETRY) && not defined(FRSKY_RX_TELEMETRY) && not defined(AFHDS2A_RX_TELEMETRY) && not defined(BAYANG_RX_TELEMETRY) && not defined(DEVO_HUB_TELEMETRY) && not defined(PROPEL_HUB_TELEMETRY) && not defined(OMP_HUB_TELEMETRY) && not defined(WFLYRF_HUB_TELEMETRY)
#if not defined(HOTT_FW_TELEMETRY) && not defined(DSM_TELEMETRY) && not defined(SPORT_TELEMETRY) && not defined(HUB_TELEMETRY) && not defined(HUBSAN_HUB_TELEMETRY) && not defined(BUGS_HUB_TELEMETRY) && not defined(NCC1701_HUB_TELEMETRY) && not defined(BAYANG_HUB_TELEMETRY) && not defined(CABELL_HUB_TELEMETRY) && not defined(RLINK_HUB_TELEMETRY) && not defined(AFHDS2A_HUB_TELEMETRY) && not defined(AFHDS2A_FW_TELEMETRY) && not defined(MULTI_TELEMETRY) && not defined(MULTI_STATUS) && not defined(HITEC_HUB_TELEMETRY) && not defined(HITEC_FW_TELEMETRY) && not defined(SCANNER_TELEMETRY) && not defined(FRSKY_RX_TELEMETRY) && not defined(AFHDS2A_RX_TELEMETRY) && not defined(BAYANG_RX_TELEMETRY) && not defined(DEVO_HUB_TELEMETRY) && not defined(PROPEL_HUB_TELEMETRY) && not defined(OMP_HUB_TELEMETRY) && not defined(WFLY2_HUB_TELEMETRY)
#undef TELEMETRY
#undef INVERT_TELEMETRY
#undef MULTI_TELEMETRY

View File

@ -13,24 +13,24 @@
along with Multiprotocol. If not, see <http://www.gnu.org/licenses/>.
*/
#if defined(WFLYRF_A7105_INO)
#if defined(WFLY2_A7105_INO)
#include "iface_a7105.h"
//#define WFLYRF_FORCE_ID
//#define WFLY2_FORCE_ID
//WFLYRF constants & variables
#define WFLYRF_BIND_COUNT 1000
#define WFLYRF_PACKET_SIZE 32
//WFLY2 constants & variables
#define WFLY2_BIND_COUNT 1000
#define WFLY2_PACKET_SIZE 32
enum{
WFLYRF_BIND,
WFLYRF_DATA,
WFLYRF_PLL_TX,
WFLYRF_RX,
WFLY2_BIND,
WFLY2_DATA,
WFLY2_PLL_TX,
WFLY2_RX,
};
static void __attribute__((unused)) WFLYRF_send_bind_packet()
static void __attribute__((unused)) WFLY2_send_bind_packet()
{
//Header
packet[0] = 0x0F; // Bind packet
@ -56,16 +56,16 @@ static void __attribute__((unused)) WFLYRF_send_bind_packet()
//Debug
#if 0
debug("ch=%02X P=",rf_ch_num);
for(uint8_t i=0; i<WFLYRF_PACKET_SIZE; i++)
for(uint8_t i=0; i<WFLY2_PACKET_SIZE; i++)
debug("%02X ", packet[i]);
debugln("");
#endif
//Send
A7105_WriteData(WFLYRF_PACKET_SIZE, rf_ch_num);
A7105_WriteData(WFLY2_PACKET_SIZE, rf_ch_num);
}
static void __attribute__((unused)) WFLYRF_build_packet()
static void __attribute__((unused)) WFLY2_build_packet()
{
static uint16_t pseudo=0;
@ -124,14 +124,14 @@ static void __attribute__((unused)) WFLYRF_build_packet()
//Debug
#if 0
debug("ch=%02X,%02X P=",rf_ch_num,(rf_ch_num<<1)+0x10);
for(uint8_t i=0; i<WFLYRF_PACKET_SIZE; i++)
for(uint8_t i=0; i<WFLY2_PACKET_SIZE; i++)
debug("%02X ", packet[i]);
debugln("");
#endif
}
#ifdef WFLYRF_HUB_TELEMETRY
static void __attribute__((unused)) WFLYRF_Send_Telemetry()
#ifdef WFLY2_HUB_TELEMETRY
static void __attribute__((unused)) WFLY2_Send_Telemetry()
{
//Incoming packet values
v_lipo1=packet[3]<<1; // RX_batt*10 in V
@ -152,45 +152,45 @@ static void __attribute__((unused)) WFLYRF_build_packet()
}
#endif
#define WFLYRF_PACKET_PERIOD 3600 //3600
#define WFLYRF_BUFFER_TIME 1500 //1500
#define WFLYRF_WRITE_TIME 800 //942
#define WFLY2_PACKET_PERIOD 3600 //3600
#define WFLY2_BUFFER_TIME 1500 //1500
#define WFLY2_WRITE_TIME 800 //942
uint16_t ReadWFLYRF()
uint16_t ReadWFLY2()
{
uint16_t start;
#ifdef WFLYRF_HUB_TELEMETRY
#ifdef WFLY2_HUB_TELEMETRY
uint8_t status;
#endif
#ifndef FORCE_WFLYRF_TUNING
#ifndef FORCE_WFLY2_TUNING
A7105_AdjustLOBaseFreq(1);
#endif
switch(phase)
{
case WFLYRF_BIND:
case WFLY2_BIND:
bind_counter--;
if (bind_counter == 0)
{
BIND_DONE;
A7105_WriteID(MProtocol_id);
rf_ch_num = 0;
phase++; // WFLYRF_DATA
phase++; // WFLY2_DATA
}
WFLYRF_send_bind_packet();
return WFLYRF_PACKET_PERIOD;
WFLY2_send_bind_packet();
return WFLY2_PACKET_PERIOD;
case WFLYRF_DATA:
case WFLY2_DATA:
#ifdef MULTI_SYNC
telemetry_set_input_sync(WFLYRF_PACKET_PERIOD);
telemetry_set_input_sync(WFLY2_PACKET_PERIOD);
#endif
//Build data packet
WFLYRF_build_packet();
WFLY2_build_packet();
//Fill the TX buffer without sending
A7105_WriteData(WFLYRF_PACKET_SIZE,0);
A7105_WriteData(WFLY2_PACKET_SIZE,0);
#ifdef WFLYRF_HUB_TELEMETRY
#ifdef WFLY2_HUB_TELEMETRY
//LQI calculation
packet_count++;
if(packet_count>=100)
@ -203,11 +203,11 @@ uint16_t ReadWFLYRF()
}
#endif
phase++; // WFLYRF_PLL_TX
return WFLYRF_BUFFER_TIME;
phase++; // WFLY2_PLL_TX
return WFLY2_BUFFER_TIME;
case WFLYRF_PLL_TX:
#ifdef WFLYRF_HUB_TELEMETRY
case WFLY2_PLL_TX:
#ifdef WFLY2_HUB_TELEMETRY
//Check RX status
status=A7105_ReadReg(A7105_00_MODE);
//debugln("S:%02X", status);
@ -216,9 +216,9 @@ uint16_t ReadWFLYRF()
//PLL
A7105_Strobe(A7105_PLL);
#ifdef WFLYRF_HUB_TELEMETRY
#ifdef WFLY2_HUB_TELEMETRY
//Read incoming packet even if bad/not present to not change too much the TX timing, might want to reorg the code...
A7105_ReadData(WFLYRF_PACKET_SIZE);
A7105_ReadData(WFLY2_PACKET_SIZE);
//Read telemetry
if((status & 0x21)==0)
@ -226,13 +226,13 @@ uint16_t ReadWFLYRF()
//Debug
#if 1
debug("T:");
for(uint8_t i=0; i<WFLYRF_PACKET_SIZE-20; i++) // Can't send the full telemetry at full speed
for(uint8_t i=0; i<WFLY2_PACKET_SIZE-20; i++) // Can't send the full telemetry at full speed
debug(" %02X", packet[i]);
debugln("");
#endif
//Packet match the ID ?
if(packet[0]==0 && packet[1]==rx_tx_addr[3] && packet[2]==(rx_tx_addr[2] & 0x03))
WFLYRF_Send_Telemetry(); // Packet looks good do send telem to the radio
WFLY2_Send_Telemetry(); // Packet looks good do send telem to the radio
}
#endif
@ -244,10 +244,10 @@ uint16_t ReadWFLYRF()
A7105_SetTxRxMode(TX_EN);
A7105_Strobe(A7105_TX);
phase++; // WFLYRF_RX
return WFLYRF_WRITE_TIME;
phase++; // WFLY2_RX
return WFLY2_WRITE_TIME;
case WFLYRF_RX:
case WFLY2_RX:
//Wait for TX completion
start=micros();
while ((uint16_t)((uint16_t)micros()-start) < 700) // Wait max 700µs
@ -258,17 +258,17 @@ uint16_t ReadWFLYRF()
A7105_SetTxRxMode(RX_EN);
A7105_Strobe(A7105_RX);
phase = WFLYRF_DATA;
return WFLYRF_PACKET_PERIOD-WFLYRF_WRITE_TIME-WFLYRF_BUFFER_TIME;
phase = WFLY2_DATA;
return WFLY2_PACKET_PERIOD-WFLY2_WRITE_TIME-WFLY2_BUFFER_TIME;
}
return WFLYRF_PACKET_PERIOD; // never reached, please the compiler
return WFLY2_PACKET_PERIOD; // never reached, please the compiler
}
uint16_t initWFLYRF()
uint16_t initWFLY2()
{
A7105_Init();
#ifdef WFLYRF_FORCE_ID
#ifdef WFLY2_FORCE_ID
MProtocol_id = 0x50002313; //Richard
//MProtocol_id = 0x50000223; //Pascal
#endif
@ -281,16 +281,16 @@ uint16_t initWFLYRF()
if(IS_BIND_IN_PROGRESS)
{
bind_counter = WFLYRF_BIND_COUNT;
bind_counter = WFLY2_BIND_COUNT;
A7105_WriteID(0x50FFFFFE); // Bind ID
phase = WFLYRF_BIND;
phase = WFLY2_BIND;
}
else
{
A7105_WriteID(MProtocol_id);
phase = WFLYRF_DATA;
phase = WFLY2_DATA;
}
#ifdef WFLYRF_HUB_TELEMETRY
#ifdef WFLY2_HUB_TELEMETRY
packet_count = 0;
telemetry_lost = 1;
#endif

View File

@ -122,7 +122,7 @@
//#define FORCE_HUBSAN_TUNING 0
//#define FORCE_KYOSHO_TUNING 0
//#define FORCE_PELIKAN_TUNING 0
//#define FORCE_WFLYRF_TUNING 0
//#define FORCE_WFLY2_TUNING 0
/** CYRF6936 Fine Frequency Tuning **/
//This is required in rare cases where some CYRF6936 modules and/or RXs have an inaccurate crystal oscillator.
@ -323,7 +323,7 @@
#define PROPEL_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
#define CABELL_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
#define RLINK_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
#define WFLYRF_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
#define WFLY2_HUB_TELEMETRY // Use FrSkyD Hub format to send telemetry to TX
#define HITEC_HUB_TELEMETRY // Use FrSkyD Hub format to send basic telemetry to the radios which can decode it like er9x, erskyTX and OpenTX
#define HITEC_FW_TELEMETRY // Forward received telemetry packets to be decoded by erskyTX and OpenTX
#define SCANNER_TELEMETRY // Forward spectrum scanner data to TX
@ -754,7 +754,7 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
V911S_E119
PROTO_WFLY
NONE
PROTO_WFLYRF
PROTO_WFLY2
NONE
PROTO_WK2x01
WK2801