From 091d8a4fa795f41df44da91fadf56a837111727f Mon Sep 17 00:00:00 2001 From: Florian Date: Wed, 15 Feb 2023 15:27:29 -0600 Subject: [PATCH] [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 --- main/ZgatewayBT.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/ZgatewayBT.ino b/main/ZgatewayBT.ino index 0a0d2b5..8b30c5d 100644 --- a/main/ZgatewayBT.ino +++ b/main/ZgatewayBT.ino @@ -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; }