From ba56166ff5041da0f8391728a0347b1172585a1a Mon Sep 17 00:00:00 2001 From: 3djc Date: Thu, 15 Jun 2023 02:39:14 +0200 Subject: [PATCH] fix(bt): BT CRC allowing reserved bytes to be sent (#3685) * Fix BT sending crc non "byte stuffed" * Fix --- radio/src/bluetooth.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/src/bluetooth.cpp b/radio/src/bluetooth.cpp index cab649403..8d5cd988e 100644 --- a/radio/src/bluetooth.cpp +++ b/radio/src/bluetooth.cpp @@ -268,7 +268,7 @@ void Bluetooth::sendTrainer() pushByte(((channelValue1 & 0x0f00) >> 4) + ((channelValue2 & 0x00f0) >> 4)); pushByte(((channelValue2 & 0x000f) << 4) + ((channelValue2 & 0x0f00) >> 8)); } - buffer[bufferIndex++] = crc; + pushByte(crc); buffer[bufferIndex++] = START_STOP; // end byte write(buffer, bufferIndex); @@ -293,7 +293,7 @@ void Bluetooth::forwardTelemetry(const uint8_t * packet) for (uint8_t i=0; i= 2*FRSKY_SPORT_PACKET_SIZE) {