1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00
This commit is contained in:
Bertrand Songis 2019-11-07 13:39:38 +01:00
parent 9b05060a1a
commit 3f0ce109ad
No known key found for this signature in database
GPG key ID: F189F79290FEC50F
5 changed files with 12 additions and 11 deletions

View file

@ -257,9 +257,8 @@ static void processMultiRxChannels(const uint8_t * data, uint8_t len)
uint8_t bitsavailable = 0;
uint8_t byteIdx = 4;
while(ch < maxCh) {
while((bitsavailable < MULTI_CHAN_BITS) && byteIdx < len) {
while (ch < maxCh) {
while (bitsavailable < MULTI_CHAN_BITS && byteIdx < len) {
bits |= (uint32_t)(data[byteIdx++]) << (uint32_t)bitsavailable;
bitsavailable += 8;
}