1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-10-06 13:20:30 +02:00

CMF Watch Pro: Log outbound commands

This commit is contained in:
José Rebelo 2024-07-27 19:46:27 +01:00
parent 9d3632d505
commit ecda7b9f78

View File

@ -80,7 +80,8 @@ public class CmfCharacteristic {
public void sendCommand(final TransactionBuilder builder, final CmfCommand cmd, final byte[] payload) {
final byte[][] chunks;
if (shouldEncrypt(cmd)) {
final boolean encrypted = shouldEncrypt(cmd);
if (encrypted) {
chunks = makeChunksEncrypted(payload);
} else {
chunks = makeChunksPlaintext(payload);
@ -91,6 +92,12 @@ public class CmfCharacteristic {
return;
}
LOG.debug(
"Send command: cmd={}{}",
cmd,
payload.length > 0 ? " payload=" + GB.hexdump(payload) : ""
);
for (int i = 0; i < chunks.length; i++) {
final byte[] chunk = chunks[i];