From e4546052897906d27aa070d3edc33294399473e7 Mon Sep 17 00:00:00 2001 From: "Christian W. Zuckschwerdt" Date: Wed, 18 Dec 2024 10:34:03 +0100 Subject: [PATCH] minor: Fix log levels in DeltaDore-X3D --- src/devices/deltadore_x3d.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/devices/deltadore_x3d.c b/src/devices/deltadore_x3d.c index 573306b13..80a677a9e 100644 --- a/src/devices/deltadore_x3d.c +++ b/src/devices/deltadore_x3d.c @@ -286,9 +286,7 @@ static int deltadore_x3d_decode(r_device *decoder, bitbuffer_t *bitbuffer) ccitt_whitening(&len, 1); if (len > DELTADORE_X3D_MAX_PKT_LEN) { - if (decoder->verbose) { - decoder_logf(decoder, 0, __func__, "packet too large (%u bytes), dropping it\n", len); - } + decoder_logf(decoder, 1, __func__, "packet too large (%u bytes), dropping it\n", len); return DECODE_ABORT_LENGTH; } @@ -299,17 +297,13 @@ static int deltadore_x3d_decode(r_device *decoder, bitbuffer_t *bitbuffer) // dewhite the data ccitt_whitening(frame, len); - if (decoder->verbose > 1) { - decoder_log_bitrow(decoder, 0, __func__, frame, len * 8, "frame data"); - } + decoder_log_bitrow(decoder, 2, __func__, frame, len * 8, "frame data"); const uint16_t crc = crc16(frame, len - 2, 0x1021, 0x0000); const uint16_t actual_crc = (frame[len - 2] << 8 | frame[len - 1]); if (actual_crc != crc) { - if (decoder->verbose) { - decoder_logf(decoder, 0, __func__, "CRC invalid %04x != %04x\n", actual_crc, crc); - } + decoder_logf(decoder, 1, __func__, "CRC invalid %04x != %04x\n", actual_crc, crc); return DECODE_FAIL_MIC; }