1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 09:16:07 +03:00

Merge pull request #9563 from mikeller/fixed_frsky_spi_rx_frame_handling

Fixed frame handling for FrSky SPI RX.
This commit is contained in:
Michael Keller 2020-03-10 00:32:10 +13:00 committed by GitHub
commit a763ea14b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -370,7 +370,7 @@ rx_spi_received_e frSkyXHandlePacket(uint8_t * const packet, uint8_t * const pro
FALLTHROUGH;
// here FS code could be
case STATE_DATA:
if (rxSpiGetExtiState() && (frameReceived == false)) {
if (rxSpiGetExtiState() && (!frameReceived)) {
uint8_t ccLen = cc2500ReadReg(CC2500_3B_RXBYTES | CC2500_READ_BURST) & 0x7F;
if (ccLen >= packetLength) {
cc2500ReadFifo(packet, packetLength);
@ -470,6 +470,8 @@ rx_spi_received_e frSkyXHandlePacket(uint8_t * const packet, uint8_t * const pro
}
if (frameReceived) {
ret |= RX_SPI_RECEIVED_DATA;
frameReceived = false;
}
break;