mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 18:48:11 +00:00
Fixed Frsky telemetry
This commit is contained in:
parent
05cc4b4bd1
commit
9ab8b84d81
@ -195,7 +195,7 @@ uint16_t ReadFrSky_2way()
|
||||
if (state == FRSKY_DATA1)
|
||||
{
|
||||
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
|
||||
#if defined(TELEMETRY)
|
||||
|
@ -64,7 +64,7 @@ void compute_RSSIdbm()
|
||||
|
||||
void frsky_check_telemetry(uint8_t *pkt,uint8_t len)
|
||||
{
|
||||
if(pkt[1] == rx_tx_addr[3] || pkt[2] == rx_tx_addr[2] || len ==(pkt[0] + 3))
|
||||
if(pkt[1] == rx_tx_addr[3] && pkt[2] == rx_tx_addr[2] && len ==(pkt[0] + 3))
|
||||
{
|
||||
for (uint8_t i=3;i<len;i++)
|
||||
pktt[i]=pkt[i];
|
||||
|
Loading…
x
Reference in New Issue
Block a user