Skip to content

Commit

Permalink
[BT] Improve conditions of adaptive scanning (#1450)
Browse files Browse the repository at this point in the history
To avoid setting several times the BLEinterval for one sensor
  • Loading branch information
1technophile authored Feb 10, 2023
1 parent 5bcf214 commit 115fdf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/ZgatewayBT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ void process_bledata(JsonObject& BLEdata) {
Log.notice(F("Active and continuous scanning required, paramaters adapted" CR));
stateBTMeasures(false);
}
} else if (BLEdata.containsKey("cont")) {
} else if (BLEdata.containsKey("cont") && BTConfig.BLEinterval != MinTimeBtwScan) {
if (BLEdata["cont"]) {
BTConfig.BLEinterval = MinTimeBtwScan;
Log.notice(F("Passive continuous scanning required, paramaters adapted" CR));
Expand Down

0 comments on commit 115fdf8

Please sign in to comment.