diff --git a/CHANGELOG.md b/CHANGELOG.md index 32a317320..78a0d48d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -357,7 +357,8 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac - Fix T55xx config getting displayed when using password when no password needed on read. (@mwalker33) - Fix `em 4x05_dump` to print all blocks read (@mwalker33) - Added save to .eml and .bin for `em 4x05_dump` (@mwalker33) - + - Added `s` to `lf config` / `lf sniff` to skip samples when sniffing (@mwalker33) + ### Fixed - Changed driver file proxmark3.inf to support both old and new Product/Vendor IDs (@pwpiwi) - Changed start sequence in Qt mode (fix: short commands hangs main Qt thread) (@merlokk) diff --git a/armsrc/lfsampling.c b/armsrc/lfsampling.c index 0926cca04..97951ef37 100644 --- a/armsrc/lfsampling.c +++ b/armsrc/lfsampling.c @@ -51,8 +51,9 @@ void setSamplingConfig(sample_config *sc) { if (sc->divisor != 0) config.divisor = sc->divisor; if (sc->bits_per_sample != 0) config.bits_per_sample = sc->bits_per_sample; if (sc->trigger_threshold != -1) config.trigger_threshold = sc->trigger_threshold; - if (sc->samples_to_skip != -1) config.samples_to_skip = sc->samples_to_skip; +// if (sc->samples_to_skip == 0xffffffff) // if needed to not update if not supplied + config.samples_to_skip = sc->samples_to_skip; config.decimation = (sc->decimation != 0) ? sc->decimation : 1; config.averaging = sc->averaging; if (config.bits_per_sample > 8) config.bits_per_sample = 8; @@ -126,7 +127,7 @@ void LFSetupFPGAForADC(int divisor, bool lf_field) { * @param silent - is true, now outputs are made. If false, dbprints the status * @return the number of bits occupied by the samples. */ -uint32_t DoAcquisition(uint8_t decimation, uint32_t bits_per_sample, bool averaging, int trigger_threshold, bool silent, int bufsize, uint32_t cancel_after, int samples_to_skip) { +uint32_t DoAcquisition(uint8_t decimation, uint32_t bits_per_sample, bool averaging, int trigger_threshold, bool silent, int bufsize, uint32_t cancel_after, uint32_t samples_to_skip) { uint8_t *dest = BigBuf_get_addr(); bufsize = (bufsize > 0 && bufsize < BigBuf_max_traceLen()) ? bufsize : BigBuf_max_traceLen(); diff --git a/client/cmdlf.c b/client/cmdlf.c index 16e8a64d5..8f540310f 100644 --- a/client/cmdlf.c +++ b/client/cmdlf.c @@ -400,7 +400,7 @@ int CmdLFSetConfig(const char *Cmd) { bool errors = false; int trigger_threshold = -1;//Means no change uint8_t unsigned_trigg = 0; - int samples_to_skip = -1; + uint32_t samples_to_skip = 0; // will return offset to 0 if not supplied. Could set to 0xffffffff if needed to not update uint8_t cmdp = 0; diff --git a/include/pm3_cmd.h b/include/pm3_cmd.h index a8ef019d7..010e46728 100644 --- a/include/pm3_cmd.h +++ b/include/pm3_cmd.h @@ -118,7 +118,7 @@ typedef struct { bool averaging; int divisor; int trigger_threshold; - int samples_to_skip; + uint32_t samples_to_skip; } PACKED sample_config; /* typedef struct {