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)
This commit is contained in:
1 parent
aec3ff64e2
commit
4a8f425379
1 file changed
+3
-1
+3
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user