From 8696b521ef9481ac77944493553dc1317c4aef30 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 3 Feb 2020 21:38:42 +0100 Subject: [PATCH] protect debug messages --- common/lfdemod.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/lfdemod.c b/common/lfdemod.c index 2a9983130..325294258 100644 --- a/common/lfdemod.c +++ b/common/lfdemod.c @@ -206,7 +206,7 @@ void getHiLo(int *high, int *low, uint8_t fuzzHi, uint8_t fuzzLo) { *low = signalprop.low; } - prnt("getHiLo fuzzed: High %d | Low %d", *high, *low); + // prnt("getHiLo fuzzed: High %d | Low %d", *high, *low); } // by marshmellow @@ -1566,7 +1566,7 @@ static uint16_t cleanAskRawDemod(uint8_t *bits, size_t *size, int clk, int inver } if (*startIdx == 0) { *startIdx = i - clk; - prnt("DEBUG ASK: cleanAskRawDemod minus clock [%d]", *startIdx); + if (g_debugMode == 2) prnt("DEBUG ASK: cleanAskRawDemod minus clock [%d]", *startIdx); } waveHigh = !waveHigh; smplCnt = 0; @@ -1587,7 +1587,7 @@ static uint16_t cleanAskRawDemod(uint8_t *bits, size_t *size, int clk, int inver } if (*startIdx == 0) { *startIdx = i - cl_2; - prnt("DEBUG ASK: cleanAskRawDemod minus half clock [%d]", *startIdx); + if (g_debugMode == 2) prnt("DEBUG ASK: cleanAskRawDemod minus half clock [%d]", *startIdx); } waveHigh = !waveHigh; smplCnt = 0; @@ -1651,7 +1651,7 @@ int askdemod_ext(uint8_t *bits, size_t *size, int *clk, int *invert, int maxErr, errCnt = manrawdecode(bits, size, 0, &alignPos); *startIdx += ((*clk / 2) * alignPos); - prnt("DEBUG: (askdemod_ext) CLEAN: startIdx %i, alignPos %u , bestError %zu", *startIdx, alignPos, errCnt); + if (g_debugMode == 2) prnt("DEBUG: (askdemod_ext) CLEAN: startIdx %i, alignPos %u , bestError %zu", *startIdx, alignPos, errCnt); } return errCnt; }