mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
rx,crsf: fix CRSFv3 the numOfChannels calculation
This commit is contained in:
parent
a2bbd31c9c
commit
1f0e48dd27
1 changed files with 1 additions and 1 deletions
|
@ -551,7 +551,7 @@ STATIC_UNIT_TESTED uint8_t crsfFrameStatus(rxRuntimeState_t *rxRuntimeState)
|
|||
configByte >>= CRSF_SUBSET_RC_RESERVED_CONFIGURATION_BITS;
|
||||
|
||||
// calculate the number of channels packed
|
||||
uint8_t numOfChannels = ((crsfChannelDataFrame.frame.frameLength - CRSF_FRAME_LENGTH_TYPE_CRC) * 8 - CRSF_SUBSET_RC_STARTING_CHANNEL_BITS) / channelBits;
|
||||
uint8_t numOfChannels = ((crsfChannelDataFrame.frame.frameLength - CRSF_FRAME_LENGTH_TYPE_CRC - 1) * 8) / channelBits;
|
||||
|
||||
// unpack the channel data
|
||||
uint8_t bitsMerged = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue