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:
commit
a763ea14b2
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue