From 3eea2e20bb8e5cb4a5a09d4d559dd75d2db64295 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 7 Oct 2020 22:50:22 +0200 Subject: [PATCH] askdemod_ext: update startIdx in case of weak demodulation too --- common/lfdemod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/lfdemod.c b/common/lfdemod.c index 7b899e99e..b6869ba43 100644 --- a/common/lfdemod.c +++ b/common/lfdemod.c @@ -1663,6 +1663,7 @@ int askdemod_ext(uint8_t *bits, size_t *size, int *clk, int *invert, int maxErr, return errCnt; } + *startIdx = start - (*clk / 2); if (g_debugMode == 2) prnt("DEBUG: (askdemod_ext) Weak wave detected: startIdx %i", *startIdx); int lastBit; //set first clock check - can go negative