[BT] Fix for saving interval and intervalacts separately from the save keyword (#1462)

The interval and intervalacts were overwritten at startup when adaptive scan was deactivated
This commit is contained in:
Florian authored and GitHub committed 2023-02-15 15:27:29 -06:00
1 parent d09f13bf86
commit 091d8a4fa7
1 file changed
+1 -1
+1 -1
View File
@@ -152,7 +152,7 @@ void BTConfig_fromJson(JsonObject& BTdata, bool startup = false) {
// Attempts to connect to eligible devices or not
BTConfig_update(BTdata, "bleconnect", BTConfig.bleConnect);
// Identify AdaptiveScan deactivation to pass to continuous mode
if (BTdata.containsKey("adaptivescan") && BTdata["adaptivescan"] == false && BTConfig.adaptiveScan == true) {
if (BTdata.containsKey("adaptivescan") && BTdata["adaptivescan"] == false && BTConfig.adaptiveScan == true && startup == false) {
BTdata["interval"] = MinTimeBtwScan;
BTdata["intervalacts"] = MinTimeBtwScan;
}