Active Scan Interval (#1433)

This commit is contained in:
DigiH authored and GitHub committed 2023-02-07 12:25:40 -06:00
1 parent 03c83fb69c
commit 05f83c5f80
3 files changed
+32 -4

No files matched your search

+6 -2
View File
@@ -66,7 +66,7 @@ extern int btQueueLengthCount;
#define MinimumRSSI -100 //default minimum rssi value, all the devices below -100 will not be reported
#ifndef Scan_duration
# define Scan_duration 10000 //define the time for a scan); in milliseconds
# define Scan_duration 10000 //define the time for a scan; in milliseconds
#endif
#ifndef BLEScanInterval
# define BLEScanInterval 52 // How often the scan occurs / switches channels; in milliseconds,
@@ -77,6 +77,9 @@ extern int btQueueLengthCount;
#ifndef ActiveBLEScan
# define ActiveBLEScan true // Set active scanning, this will get more data from the advertiser.
#endif
#ifndef TimeBtwActive
# define TimeBtwActive 55555 //define default time between two BLE active scans when general passive scanning is selected; in milliseconds
#endif
#ifndef TimeBtwConnect
# define TimeBtwConnect 3600000 //define default time between BLE connection attempt (not used for immediate actions); in milliseconds
#endif
@@ -85,7 +88,7 @@ extern int btQueueLengthCount;
# define BLEScanDuplicateCacheSize 200
#endif
#ifndef TimeBtwRead
# define TimeBtwRead 55555 //define default time between 2 scans); in milliseconds
# define TimeBtwRead 55555 //define default time between 2 scans; in milliseconds
#endif
#ifndef PublishOnlySensors
@@ -131,6 +134,7 @@ unsigned long scanCount = 0;
struct BTConfig_s {
bool bleConnect; // Attempt a BLE connection to sensors with ESP32
bool activeScan;
unsigned long intervalActiveScan; // Time between 2 active scans when generally passive scanning
unsigned long BLEinterval; // Time between 2 scans
unsigned long intervalConnect; // Time between 2 connects
bool pubOnlySensors; // Publish only the identified sensors (like temperature sensors)