mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	[esp32_ble_tracker] Add missing USE_ESP32_BLE_DEVICE guard for already_discovered_ member
This commit is contained in:
		| @@ -241,7 +241,9 @@ void ESP32BLETracker::start_scan_(bool first) { | ||||
|     for (auto *listener : this->listeners_) | ||||
|       listener->on_scan_end(); | ||||
|   } | ||||
| #ifdef USE_ESP32_BLE_DEVICE | ||||
|   this->already_discovered_.clear(); | ||||
| #endif | ||||
|   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_.scan_filter_policy = BLE_SCAN_FILTER_ALLOW_ALL; | ||||
| @@ -839,7 +841,9 @@ bool ESP32BLETracker::process_scan_result_(const BLEScanResult &scan_result) { | ||||
|  | ||||
| void ESP32BLETracker::cleanup_scan_state_(bool is_stop_complete) { | ||||
|   ESP_LOGD(TAG, "Scan %scomplete, set scanner state to IDLE.", is_stop_complete ? "stop " : ""); | ||||
| #ifdef USE_ESP32_BLE_DEVICE | ||||
|   this->already_discovered_.clear(); | ||||
| #endif | ||||
|   this->cancel_timeout("scan"); | ||||
|  | ||||
|   for (auto *listener : this->listeners_) | ||||
|   | ||||
| @@ -282,8 +282,10 @@ class ESP32BLETracker : public Component, | ||||
|  | ||||
|   uint8_t app_id_{0}; | ||||
|  | ||||
| #ifdef USE_ESP32_BLE_DEVICE | ||||
|   /// Vector of addresses that have already been printed in print_bt_device_info | ||||
|   std::vector<uint64_t> already_discovered_; | ||||
| #endif | ||||
|   std::vector<ESPBTDeviceListener *> listeners_; | ||||
|   /// Client parameters. | ||||
|   std::vector<ESPBTClient *> clients_; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user