mirror of
https://github.com/esphome/esphome.git
synced 2026-08-17 02:47:52 +08:00
[esp32_ble_tracker] Demote scan-state echoes to verbose (#18302)
This commit is contained in:
@@ -364,7 +364,8 @@ bool BK72xxBLETracker::request_scan_mode(bool active) {
|
||||
if (this->scan_active_ == active)
|
||||
return true;
|
||||
this->scan_active_ = active;
|
||||
ESP_LOGD(TAG, "Scan mode %s", active ? "active" : "passive");
|
||||
// V: the proxy's "Setting scanner mode" line already narrates this at D.
|
||||
ESP_LOGV(TAG, "Scan mode %s", active ? "active" : "passive");
|
||||
// The controller reconciler restarts a running scan itself; the scan stays
|
||||
// logically running. An idle scanner picks the mode up on its next start.
|
||||
if (this->scan_running_)
|
||||
|
||||
@@ -55,6 +55,7 @@ void ESP32BLETracker::setup() {
|
||||
#ifdef USE_OTA_STATE_LISTENER
|
||||
void ESP32BLETracker::on_ota_global_state(ota::OTAState state, float progress, uint8_t error, ota::OTAComponent *comp) {
|
||||
if (state == ota::OTA_STARTED) {
|
||||
ESP_LOGD(TAG, "Stopping scan for OTA");
|
||||
this->scan_continuous_before_ota_ = this->scan_continuous_;
|
||||
this->stop_scan();
|
||||
#ifdef ESPHOME_ESP32_BLE_TRACKER_CLIENT_COUNT
|
||||
@@ -190,7 +191,9 @@ void ESP32BLETracker::loop() {
|
||||
void ESP32BLETracker::start_scan() { this->start_scan_(true); }
|
||||
|
||||
void ESP32BLETracker::stop_scan() {
|
||||
ESP_LOGD(TAG, "Stopping scan.");
|
||||
// V to match the start log: the mode-switch and OTA callers narrate their
|
||||
// reason at D themselves, and the user-facing stop action is deliberate.
|
||||
ESP_LOGV(TAG, "Stopping scan.");
|
||||
this->scan_continuous_ = false;
|
||||
this->stop_scan_();
|
||||
}
|
||||
|
||||
@@ -116,7 +116,8 @@ bool LN882HBLETracker::request_scan_mode(bool active) {
|
||||
if (this->scan_active_ == active)
|
||||
return true;
|
||||
this->scan_active_ = active;
|
||||
ESP_LOGD(TAG, "Scan mode %s", active ? "active" : "passive");
|
||||
// V: the proxy's "Setting scanner mode" line already narrates this at D.
|
||||
ESP_LOGV(TAG, "Scan mode %s", active ? "active" : "passive");
|
||||
// scan_start() re-enters cleanly (stops + GAPM settle). No on_scan_end and
|
||||
// no period reset: the scan logically continues, only the mode changes.
|
||||
if (this->scan_running_) {
|
||||
|
||||
@@ -165,7 +165,8 @@ bool RP2BLETracker::request_scan_mode(bool active) {
|
||||
if (this->scan_active_ == active)
|
||||
return true;
|
||||
this->scan_active_ = active;
|
||||
ESP_LOGD(TAG, "Scan mode %s", active ? "active" : "passive");
|
||||
// V: the proxy's "Setting scanner mode" line already narrates this at D.
|
||||
ESP_LOGV(TAG, "Scan mode %s", active ? "active" : "passive");
|
||||
// Apply to a running scan by restarting the CONTROLLER scan with the new
|
||||
// mode, bypassing the tracker's stop/start bookkeeping: no on_scan_end (the
|
||||
// scan logically continues, only the request mode changes), no period reset.
|
||||
|
||||
Reference in New Issue
Block a user