mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-13 11:17:33 +01:00
CMF Watch Pro: Log outbound commands
This commit is contained in:
parent
9d3632d505
commit
ecda7b9f78
@ -80,7 +80,8 @@ public class CmfCharacteristic {
|
|||||||
public void sendCommand(final TransactionBuilder builder, final CmfCommand cmd, final byte[] payload) {
|
public void sendCommand(final TransactionBuilder builder, final CmfCommand cmd, final byte[] payload) {
|
||||||
final byte[][] chunks;
|
final byte[][] chunks;
|
||||||
|
|
||||||
if (shouldEncrypt(cmd)) {
|
final boolean encrypted = shouldEncrypt(cmd);
|
||||||
|
if (encrypted) {
|
||||||
chunks = makeChunksEncrypted(payload);
|
chunks = makeChunksEncrypted(payload);
|
||||||
} else {
|
} else {
|
||||||
chunks = makeChunksPlaintext(payload);
|
chunks = makeChunksPlaintext(payload);
|
||||||
@ -91,6 +92,12 @@ public class CmfCharacteristic {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG.debug(
|
||||||
|
"Send command: cmd={}{}",
|
||||||
|
cmd,
|
||||||
|
payload.length > 0 ? " payload=" + GB.hexdump(payload) : ""
|
||||||
|
);
|
||||||
|
|
||||||
for (int i = 0; i < chunks.length; i++) {
|
for (int i = 0; i < chunks.length; i++) {
|
||||||
final byte[] chunk = chunks[i];
|
final byte[] chunk = chunks[i];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user