Fix telemetry bug

This commit is contained in:
midelic 2016-07-28 15:41:12 +03:00 committed by GitHub
parent 4116d2f7c6
commit 8f1854d1e2

View File

@ -195,7 +195,7 @@ uint16_t ReadFrSky_2way()
if (state == FRSKY_DATA1) if (state == FRSKY_DATA1)
{ {
len = CC2500_ReadReg(CC2500_3B_RXBYTES | CC2500_READ_BURST) & 0x7F; len = CC2500_ReadReg(CC2500_3B_RXBYTES | CC2500_READ_BURST) & 0x7F;
if (len<=MAX_PKT)//27 bytes if (len && len<=MAX_PKT)//27 bytes
{ {
CC2500_ReadData(pkt, len); //received telemetry packets CC2500_ReadData(pkt, len); //received telemetry packets
#if defined(TELEMETRY) #if defined(TELEMETRY)