1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-14 07:43:48 +01:00

Move esp32_ble_server to its own component (#1898)

This commit is contained in:
Jesse Hills
2021-06-12 08:31:15 +12:00
committed by GitHub
parent eb24da7c82
commit 5a2cfa2798
24 changed files with 192 additions and 146 deletions

View File

@@ -32,6 +32,10 @@ BLEAdvertising::BLEAdvertising() {
}
void BLEAdvertising::add_service_uuid(ESPBTUUID uuid) { this->advertising_uuids_.push_back(uuid); }
void BLEAdvertising::remove_service_uuid(ESPBTUUID uuid) {
this->advertising_uuids_.erase(std::remove(this->advertising_uuids_.begin(), this->advertising_uuids_.end(), uuid),
this->advertising_uuids_.end());
}
void BLEAdvertising::start() {
int num_services = this->advertising_uuids_.size();