From 8eba9a7b6dc6efddb2bb8bfb40008d7c46d15a2f Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Mon, 30 Jan 2023 01:03:24 +0100 Subject: [PATCH] libtest: fixed a bug. --- aqhome/libtest.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/aqhome/libtest.c b/aqhome/libtest.c index 2f1bf41..0f2c1c7 100644 --- a/aqhome/libtest.c +++ b/aqhome/libtest.c @@ -140,8 +140,13 @@ void _packetReceived(AQH_SERIAL *sr, const uint8_t *ptr, uint8_t len) availability=ptr[5]; fprintf(stdout, "-> I2C DEVICE %02x: %s\n", i2cAddr, (availability==0)?"not available":"FOUND"); } - else if (ptr[5]==1) { - fprintf(stdout, "-> Debug\n"); + else if (ptr[2]==5) { + uint8_t param1; + uint8_t param2; + + param1=ptr[4]; + param2=ptr[5]; + fprintf(stdout, "-> Debug param1=%02x, param2=%02x\n", param1, param2); } }