Merge pull request #1657 from wh201906/fix_lf_config_reset

Fix a bug in "lf config"
This commit is contained in:
Iceman 2022-04-09 17:20:28 +02:00 committed by GitHub
commit e041ee035e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -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)

View file

@ -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