mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +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:
parent
7a5ffad37a
commit
b92bdaaabc
1 changed files with 3 additions and 1 deletions
|
@ -368,7 +368,7 @@ rx_spi_received_e frSkyXHandlePacket(uint8_t * const packet, uint8_t * const pro
|
|||
FALLTHROUGH;
|
||||
// here FS code could be
|
||||
case STATE_DATA:
|
||||
if (cc2500getGdo() && (frameReceived == false)){
|
||||
if (cc2500getGdo() && (!frameReceived)) {
|
||||
uint8_t ccLen = cc2500ReadReg(CC2500_3B_RXBYTES | CC2500_READ_BURST) & 0x7F;
|
||||
if (ccLen >= packetLength) {
|
||||
cc2500ReadFifo(packet, packetLength);
|
||||
|
@ -468,6 +468,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