mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-26 16:41:43 +01:00
Colmi R0x: Increase logging of V2 packets
This commit is contained in:
parent
ba3e60376d
commit
873a044a69
@ -344,10 +344,12 @@ public class ColmiR0xDeviceSupport extends AbstractBTLEDeviceSupport {
|
|||||||
if (bigDataPacket.limit() < bigDataPacketSize + 6) {
|
if (bigDataPacket.limit() < bigDataPacketSize + 6) {
|
||||||
// If the received data is smaller than the expected packet size (+ 6 bytes header),
|
// If the received data is smaller than the expected packet size (+ 6 bytes header),
|
||||||
// wait for the next packet and append it
|
// wait for the next packet and append it
|
||||||
|
LOG.debug("Big data packet is not complete yet, got {} bytes while expecting {}+6. Waiting for more...", bigDataPacket.limit(), bigDataPacketSize);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
value = bigDataPacket.array();
|
value = bigDataPacket.array();
|
||||||
bigDataPacket = null;
|
bigDataPacket = null;
|
||||||
|
LOG.debug("Big data packet complete, got {} bytes while expecting {}+6", value.length, bigDataPacketSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (value[0]) {
|
switch (value[0]) {
|
||||||
@ -356,7 +358,7 @@ public class ColmiR0xDeviceSupport extends AbstractBTLEDeviceSupport {
|
|||||||
if (value.length < packetLength + 6) {
|
if (value.length < packetLength + 6) {
|
||||||
// If the received packet is smaller than the expected packet size (+ 6 bytes header),
|
// If the received packet is smaller than the expected packet size (+ 6 bytes header),
|
||||||
// wait for the next packet and append it
|
// wait for the next packet and append it
|
||||||
LOG.debug("Big data packet is not complete yet, got {} bytes while expecting {}. Waiting for more...", value.length, packetLength + 6);
|
LOG.debug("Big data packet is not complete yet, got {} bytes while expecting {}+6. Waiting for more...", value.length, packetLength);
|
||||||
bigDataPacketSize = packetLength;
|
bigDataPacketSize = packetLength;
|
||||||
bigDataPacket = ByteBuffer.wrap(value);
|
bigDataPacket = ByteBuffer.wrap(value);
|
||||||
return true;
|
return true;
|
||||||
@ -376,7 +378,7 @@ public class ColmiR0xDeviceSupport extends AbstractBTLEDeviceSupport {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG.info("Received unrecognized big data packet: {}", StringUtils.bytesToHex(value));
|
LOG.info("Received unrecognized notify v2 packet: {}", StringUtils.bytesToHex(value));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user