From 08ebca682cc85e938b3863d60e74ebf5b728a622 Mon Sep 17 00:00:00 2001 From: marshmellow42 Date: Wed, 28 Jan 2015 11:45:31 -0500 Subject: [PATCH] lf hid fskdemod bug re-introduced in last bigbuf changes --- armsrc/lfops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/armsrc/lfops.c b/armsrc/lfops.c index 31ee6358..b703c3cd 100644 --- a/armsrc/lfops.c +++ b/armsrc/lfops.c @@ -633,8 +633,8 @@ void CmdHIDsimTAG(int hi, int lo, int ledcontrol) void CmdHIDdemodFSK(int findone, int *high, int *low, int ledcontrol) { uint8_t *dest = BigBuf_get_addr(); - - size_t size = BigBuf_max_traceLen(); + const size_t sizeOfBigBuff = BigBuf_max_traceLen(); + size_t size = 0; uint32_t hi2=0, hi=0, lo=0; int idx=0; // Configure to go in 125Khz listen mode @@ -647,6 +647,7 @@ void CmdHIDdemodFSK(int findone, int *high, int *low, int ledcontrol) DoAcquisition125k_internal(-1,true); // FSK demodulator + size = sizeOfBigBuff; //variable size will change after demod so re initialize it before use idx = HIDdemodFSK(dest, &size, &hi2, &hi, &lo); if (idx>0 && lo>0){ -- 2.39.5