Create BLE connect class and add derivatives (#979)

This commit is contained in:
h2zero authored and GitHub committed 2021-06-17 16:52:03 -05:00
1 parent d35cc03b49
commit 792807e6e5
4 files changed
+250 -157

No files matched your search

+18
View File
@@ -40,6 +40,12 @@ extern int btQueueLengthCount;
# define AttemptBLECOnnect true //do we by default attempt a BLE connection to sensors with ESP32
# endif
bool bleConnect = AttemptBLECOnnect;
// Sets whether to filter publishing of scanned devices that require a connection.
// Default (1) prevents overwriting the publication of the device connection data with the advertised data.
# ifndef BLE_FILTER_CONNECTABLE
# define BLE_FILTER_CONNECTABLE 1
# endif
#endif
/*----------------------BT topics & parameters-------------------------*/
@@ -161,4 +167,16 @@ enum ble_sensor_model {
# endif
#endif
/*---------------INTERNAL USE: DO NOT MODIFY--------------*/
struct BLEdevice {
char macAdr[18];
bool isDisc;
bool isWhtL;
bool isBlkL;
bool connect;
ble_sensor_model sensorModel;
};
JsonObject& getBTJsonObject(const char* json = NULL, bool haPresenceEnabled = true);
#endif