1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-30 09:02:17 +01:00
This commit is contained in:
J. Nick Koston
2025-09-27 11:09:10 -05:00
parent 7aa0815cd2
commit e6ca3afd56

View File

@@ -81,19 +81,10 @@ void ESP32BLE::advertising_set_service_data_and_name(std::span<const uint8_t> da
// when changing both properties, avoiding the brief gap that would occur with separate calls.
this->advertising_init_();
bool needs_restart = false;
this->advertising_->set_service_data(data);
if (this->advertising_->get_include_name() != include_name) {
this->advertising_->set_include_name(include_name);
needs_restart = true;
}
if (needs_restart || !data.empty()) {
this->advertising_start();
}
}
void ESP32BLE::advertising_register_raw_advertisement_callback(std::function<void(bool)> &&callback) {
this->advertising_init_();