mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 19:58:13 +00:00
FrSkyX: fix telemetry not stopping when RX is off
This commit is contained in:
parent
49d993f613
commit
e56f737b34
@ -277,7 +277,7 @@ uint16_t ReadFrSkyX()
|
|||||||
telemetry_link=1; //Send telemetry out anyway
|
telemetry_link=1; //Send telemetry out anyway
|
||||||
#endif
|
#endif
|
||||||
len = CC2500_ReadReg(CC2500_3B_RXBYTES | CC2500_READ_BURST) & 0x7F;
|
len = CC2500_ReadReg(CC2500_3B_RXBYTES | CC2500_READ_BURST) & 0x7F;
|
||||||
if (len <= 17) //Telemetry frame is 17 bytes
|
if (len && len <= 17) //Telemetry frame is 17 bytes
|
||||||
{
|
{
|
||||||
//debug("Telem:");
|
//debug("Telem:");
|
||||||
packet_count=0;
|
packet_count=0;
|
||||||
@ -291,8 +291,8 @@ uint16_t ReadFrSkyX()
|
|||||||
len=0; //Discard frame
|
len=0; //Discard frame
|
||||||
}
|
}
|
||||||
#if defined TELEMETRY
|
#if defined TELEMETRY
|
||||||
if(protocol==PROTO_FRSKYX || (protocol==PROTO_FRSKYX2 && (packet_in[len-1] & 0x80)) )
|
if(len==17 && (protocol==PROTO_FRSKYX || (protocol==PROTO_FRSKYX2 && (packet_in[len-1] & 0x80))) )
|
||||||
{//with valid crc for FRSKYX2
|
{//Telemetry received with valid crc for FRSKYX2
|
||||||
//Debug
|
//Debug
|
||||||
//for(uint8_t i=0;i<len;i++)
|
//for(uint8_t i=0;i<len;i++)
|
||||||
// debug(" %02X",packet_in[i]);
|
// debug(" %02X",packet_in[i]);
|
||||||
@ -301,7 +301,7 @@ uint16_t ReadFrSkyX()
|
|||||||
#endif
|
#endif
|
||||||
//debugln("");
|
//debugln("");
|
||||||
}
|
}
|
||||||
else
|
if(len!=17)
|
||||||
{
|
{
|
||||||
packet_count++;
|
packet_count++;
|
||||||
//debugln("M %d",packet_count);
|
//debugln("M %d",packet_count);
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_REVISION 1
|
#define VERSION_REVISION 1
|
||||||
#define VERSION_PATCH_LEVEL 31
|
#define VERSION_PATCH_LEVEL 32
|
||||||
|
|
||||||
//******************
|
//******************
|
||||||
// Protocols
|
// Protocols
|
||||||
|
Loading…
x
Reference in New Issue
Block a user