1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-27 12:26:48 +01:00

Colmi R0x: Fix big data packet handling

This commit is contained in:
René Vögeli 2024-10-14 23:13:38 +02:00 committed by René Vögeli
parent cb7053e609
commit ace0aa3ea7

View File

@ -343,6 +343,7 @@ public class ColmiR0xDeviceSupport extends AbstractBTLEDeviceSupport {
// Big data responses can arrive in multiple packets that need to be concatenated
if (bigDataPacket != null) {
LOG.debug("Received {} bytes on big data characteristic while waiting for follow-up data", value.length);
bigDataPacket.rewind();
ByteBuffer concatenated = ByteBuffer
.allocate(bigDataPacket.limit() + value.length)
.put(bigDataPacket)