mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 19:48:11 +00:00
WFLY2: fix bind after code cleanup...
This commit is contained in:
parent
cfe80edcb6
commit
4887fca873
@ -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_WFLY2)
|
||||
if(protocol!=PROTO_WFLY2 || phase==0)
|
||||
{
|
||||
if(!(protocol==PROTO_FLYSKY || protocol==PROTO_KYOSHO))
|
||||
{
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 3
|
||||
#define VERSION_REVISION 1
|
||||
#define VERSION_PATCH_LEVEL 84
|
||||
#define VERSION_PATCH_LEVEL 85
|
||||
|
||||
//******************
|
||||
// Protocols
|
||||
|
@ -153,7 +153,7 @@ static void __attribute__((unused)) WFLY2_build_packet()
|
||||
}
|
||||
#endif
|
||||
|
||||
#define WFLY2_PACKET_PERIOD 3600 //3600
|
||||
#define WFLY2_PACKET_PERIOD 3600 //3600
|
||||
#define WFLY2_BUFFER_TIME 1500 //1500
|
||||
#define WFLY2_WRITE_TIME 800 //942
|
||||
|
||||
@ -171,15 +171,18 @@ uint16_t ReadWFLY2()
|
||||
{
|
||||
case WFLY2_BIND:
|
||||
bind_counter--;
|
||||
if (bind_counter == 0)
|
||||
if (bind_counter)
|
||||
{
|
||||
WFLY2_send_bind_packet();
|
||||
return WFLY2_PACKET_PERIOD;
|
||||
}
|
||||
else
|
||||
{
|
||||
BIND_DONE;
|
||||
A7105_WriteID(MProtocol_id);
|
||||
rf_ch_num = 0;
|
||||
phase++; // WFLY2_DATA
|
||||
}
|
||||
WFLY2_send_bind_packet();
|
||||
return WFLY2_PACKET_PERIOD;
|
||||
|
||||
case WFLY2_DATA:
|
||||
#ifdef MULTI_SYNC
|
||||
|
@ -173,8 +173,9 @@
|
||||
#define FLYSKY_A7105_INO
|
||||
#define HEIGHT_A7105_INO
|
||||
#define HUBSAN_A7105_INO
|
||||
#define KYOSHO_A7105_INO
|
||||
#define KYOSHO_A7105_INO
|
||||
#define PELIKAN_A7105_INO
|
||||
#define WFLY2_A7105_INO
|
||||
|
||||
//The protocols below need a CYRF6936 to be installed
|
||||
#define DEVO_CYRF6936_INO
|
||||
|
Loading…
x
Reference in New Issue
Block a user