1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-19 08:15:49 +00:00

[mdns] Use FixedVector for txt_records to reduce flash usage (#11228)

This commit is contained in:
J. Nick Koston
2025-10-14 16:16:59 -10:00
committed by GitHub
parent c983581b6c
commit 7a82379c88
6 changed files with 23 additions and 8 deletions

View File

@@ -12,8 +12,13 @@ namespace esphome {
namespace mdns {
void MDNSComponent::setup() {
#ifdef USE_MDNS_STORE_SERVICES
this->compile_records_(this->services_);
const auto &services = this->services_;
#else
StaticVector<MDNSService, MDNS_SERVICE_COUNT> services;
this->compile_records_(services);
#endif
MDNS.begin(this->hostname_.c_str());