[BLE] Add dynamic active scan runtime setting (#1360)

This commit add the capability to set passive scanning during runtime, versus buildtime before, so as to improve energy consumption of sensors when they don't require active scanning
This commit is contained in:
Florian authored and GitHub committed 2022-12-14 17:03:34 -06:00
1 parent 807c668489
commit 8dde777fb7
4 files changed
+28 -1

No files matched your search

+1
View File
@@ -146,6 +146,7 @@ unsigned long scanCount = 0;
/*----------------CONFIGURABLE PARAMETERS-----------------*/
struct BTConfig_s {
bool bleConnect; // Attempt a BLE connection to sensors with ESP32
bool activeScan;
unsigned int BLEinterval; // Time between 2 scans
unsigned int BLEscanBeforeConnect; // Number of BLE scans between connection cycles
bool pubOnlySensors; // Publish only the identified sensors (like temperature sensors)