mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-25 16:15:55 +01:00
Colmi R0x: Fix big data packet handling
This commit is contained in:
parent
cb7053e609
commit
ace0aa3ea7
@ -343,6 +343,7 @@ public class ColmiR0xDeviceSupport extends AbstractBTLEDeviceSupport {
|
|||||||
// Big data responses can arrive in multiple packets that need to be concatenated
|
// Big data responses can arrive in multiple packets that need to be concatenated
|
||||||
if (bigDataPacket != null) {
|
if (bigDataPacket != null) {
|
||||||
LOG.debug("Received {} bytes on big data characteristic while waiting for follow-up data", value.length);
|
LOG.debug("Received {} bytes on big data characteristic while waiting for follow-up data", value.length);
|
||||||
|
bigDataPacket.rewind();
|
||||||
ByteBuffer concatenated = ByteBuffer
|
ByteBuffer concatenated = ByteBuffer
|
||||||
.allocate(bigDataPacket.limit() + value.length)
|
.allocate(bigDataPacket.limit() + value.length)
|
||||||
.put(bigDataPacket)
|
.put(bigDataPacket)
|
||||||
|
Loading…
Reference in New Issue
Block a user