Add ble RSSI sensor for connected devices (#3860)

This commit is contained in:
RoboMagus
2022-10-12 04:23:56 +02:00
committed by GitHub
parent 19900b004b
commit 9f9980e338
6 changed files with 197 additions and 25 deletions
+4 -1
View File
@@ -27,7 +27,8 @@ class BLEClientNode {
public:
virtual void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if,
esp_ble_gattc_cb_param_t *param) = 0;
virtual void loop(){};
virtual void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) {}
virtual void loop() {}
void set_address(uint64_t address) { address_ = address; }
espbt::ESPBTClient *client;
// This should be transitioned to Established once the node no longer needs
@@ -51,6 +52,8 @@ class BLEClient : public BLEClientBase {
void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if,
esp_ble_gattc_cb_param_t *param) override;
void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) override;
bool parse_device(const espbt::ESPBTDevice &device) override;
void set_enabled(bool enabled);