Skip to content

Commit

Permalink
esp32_ble: Consider ESP_BT_STATUS_DONE a successful state (#6493)
Browse files Browse the repository at this point in the history
Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
  • Loading branch information
2 people authored and jesserockz committed Apr 22, 2024
1 parent 03d547d commit 44d13f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,11 @@ void ESP32BLETracker::gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_ga
}

void ESP32BLETracker::gap_scan_set_param_complete_(const esp_ble_gap_cb_param_t::ble_scan_param_cmpl_evt_param &param) {
this->scan_set_param_failed_ = param.status;
if (param.status == ESP_BT_STATUS_DONE) {
this->scan_set_param_failed_ = ESP_BT_STATUS_SUCCESS;
} else {
this->scan_set_param_failed_ = param.status;
}
}

void ESP32BLETracker::gap_scan_start_complete_(const esp_ble_gap_cb_param_t::ble_scan_start_cmpl_evt_param &param) {
Expand Down

0 comments on commit 44d13f2

Please sign in to comment.