1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-27 07:32:22 +01:00

Merge branch 'integration' into memory_api

This commit is contained in:
J. Nick Koston
2025-08-04 21:49:10 -10:00
2 changed files with 6 additions and 0 deletions

View File

@@ -177,7 +177,9 @@ void ESP32BLETracker::start_scan_(bool first) {
for (auto *listener : this->listeners_) for (auto *listener : this->listeners_)
listener->on_scan_end(); listener->on_scan_end();
} }
#ifdef USE_ESP32_BLE_DEVICE
this->already_discovered_.clear(); this->already_discovered_.clear();
#endif
this->scan_params_.scan_type = this->scan_active_ ? BLE_SCAN_TYPE_ACTIVE : BLE_SCAN_TYPE_PASSIVE; this->scan_params_.scan_type = this->scan_active_ ? BLE_SCAN_TYPE_ACTIVE : BLE_SCAN_TYPE_PASSIVE;
this->scan_params_.own_addr_type = BLE_ADDR_TYPE_PUBLIC; this->scan_params_.own_addr_type = BLE_ADDR_TYPE_PUBLIC;
this->scan_params_.scan_filter_policy = BLE_SCAN_FILTER_ALLOW_ALL; this->scan_params_.scan_filter_policy = BLE_SCAN_FILTER_ALLOW_ALL;
@@ -776,7 +778,9 @@ bool ESP32BLETracker::process_scan_result_(const BLEScanResult &scan_result) {
void ESP32BLETracker::cleanup_scan_state_(bool is_stop_complete) { void ESP32BLETracker::cleanup_scan_state_(bool is_stop_complete) {
ESP_LOGD(TAG, "Scan %scomplete, set scanner state to IDLE.", is_stop_complete ? "stop " : ""); ESP_LOGD(TAG, "Scan %scomplete, set scanner state to IDLE.", is_stop_complete ? "stop " : "");
#ifdef USE_ESP32_BLE_DEVICE
this->already_discovered_.clear(); this->already_discovered_.clear();
#endif
this->cancel_timeout("scan"); this->cancel_timeout("scan");
for (auto *listener : this->listeners_) for (auto *listener : this->listeners_)

View File

@@ -328,8 +328,10 @@ class ESP32BLETracker : public Component,
uint8_t app_id_{0}; uint8_t app_id_{0};
#ifdef USE_ESP32_BLE_DEVICE
/// Vector of addresses that have already been printed in print_bt_device_info /// Vector of addresses that have already been printed in print_bt_device_info
std::vector<uint64_t> already_discovered_; std::vector<uint64_t> already_discovered_;
#endif
std::vector<ESPBTDeviceListener *> listeners_; std::vector<ESPBTDeviceListener *> listeners_;
/// Client parameters. /// Client parameters.
std::vector<ESPBTClient *> clients_; std::vector<ESPBTClient *> clients_;