From 4a8f42537945aeefcee43e6eb2f835de1916e1c3 Mon Sep 17 00:00:00 2001 From: wh201906 <1063042587@qq.com> Date: Fri, 8 Apr 2022 19:50:38 +0800 Subject: [PATCH 1/2] Fix a bug in "lf config" When executing "lf config --reset", the averaging will be 0 rather than 1(default). This is because the config.averaging is set to 1 at first.(line 621) Then this argument is overwritten unconditionally by "config.averaging = (avg == 1);"(line 634) --- client/src/cmdlf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/cmdlf.c b/client/src/cmdlf.c index e18dd15b7..a2d7e2450 100644 --- a/client/src/cmdlf.c +++ b/client/src/cmdlf.c @@ -631,7 +631,9 @@ int CmdLFConfig(const char *Cmd) { if (use_134) config.divisor = LF_DIVISOR_134; - config.averaging = (avg == 1); + // check if the config.averaging is not set by if(reset){...} + if (config.averaging == -1) + config.averaging = (avg == 1); if (bps > -1) { // bps is limited to 8 From 52c5a400ad94a6cf6ef34a25aa65f0b98ce14545 Mon Sep 17 00:00:00 2001 From: wh201906 <1063042587@qq.com> Date: Fri, 8 Apr 2022 19:54:49 +0800 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d10c75f6..39ce29b0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] + - Fixed `lf config --reset` - averaging is set to 1 rather than 0 (@wh201906) - Added standalone mode for sniffing 14b (@jacopo-j) - Fixed `hf 14a apdu` - now don't skip first P2 iteration (@iceman1001) - Added `hf ntag424` - skeleton with SDM (@iceman1001)