mirror of
https://github.com/esphome/esphome.git
synced 2025-11-14 22:05:54 +00:00
Add stop action for ble scanning (#3799)
This commit is contained in:
@@ -156,6 +156,13 @@ void ESP32BLETracker::start_scan() {
|
||||
}
|
||||
}
|
||||
|
||||
void ESP32BLETracker::stop_scan() {
|
||||
ESP_LOGD(TAG, "Stopping scan.");
|
||||
this->scan_continuous_ = false;
|
||||
esp_ble_gap_stop_scanning();
|
||||
this->cancel_timeout("scan");
|
||||
}
|
||||
|
||||
bool ESP32BLETracker::ble_setup() {
|
||||
// Initialize non-volatile storage for the bluetooth controller
|
||||
esp_err_t err = nvs_flash_init();
|
||||
|
||||
Reference in New Issue
Block a user