mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
[esp32_ble_tracker] Fix on_scan_end trigger compilation without USE_ESP32_BLE_DEVICE (#10399)
This commit is contained in:
committed by
Jesse Hills
parent
d9dcfe66ec
commit
c542db8bfe
@@ -80,14 +80,17 @@ class BLEManufacturerDataAdvertiseTrigger : public Trigger<const adv_data_t &>,
|
|||||||
ESPBTUUID uuid_;
|
ESPBTUUID uuid_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // USE_ESP32_BLE_DEVICE
|
||||||
|
|
||||||
class BLEEndOfScanTrigger : public Trigger<>, public ESPBTDeviceListener {
|
class BLEEndOfScanTrigger : public Trigger<>, public ESPBTDeviceListener {
|
||||||
public:
|
public:
|
||||||
explicit BLEEndOfScanTrigger(ESP32BLETracker *parent) { parent->register_listener(this); }
|
explicit BLEEndOfScanTrigger(ESP32BLETracker *parent) { parent->register_listener(this); }
|
||||||
|
|
||||||
|
#ifdef USE_ESP32_BLE_DEVICE
|
||||||
bool parse_device(const ESPBTDevice &device) override { return false; }
|
bool parse_device(const ESPBTDevice &device) override { return false; }
|
||||||
|
#endif
|
||||||
void on_scan_end() override { this->trigger(); }
|
void on_scan_end() override { this->trigger(); }
|
||||||
};
|
};
|
||||||
#endif // USE_ESP32_BLE_DEVICE
|
|
||||||
|
|
||||||
template<typename... Ts> class ESP32BLEStartScanAction : public Action<Ts...> {
|
template<typename... Ts> class ESP32BLEStartScanAction : public Action<Ts...> {
|
||||||
public:
|
public:
|
||||||
|
@@ -0,0 +1,3 @@
|
|||||||
|
esp32_ble_tracker:
|
||||||
|
on_scan_end:
|
||||||
|
- logger.log: "Scan ended!"
|
Reference in New Issue
Block a user