1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-31 23:21:54 +00:00

must still be in ram on 8266

This commit is contained in:
J. Nick Koston
2025-10-24 14:37:29 -07:00
parent 3025d35554
commit ccdce3508c

View File

@@ -34,7 +34,9 @@ class SNTPComponent : public time::RealTimeClock {
void time_synced(); void time_synced();
protected: protected:
// Store const char pointers - compiler stores string literals in flash on all platforms // Store const char pointers to string literals
// ESP8266: strings in rodata (RAM), but avoids std::string overhead (~24 bytes each)
// Other platforms: strings in flash
std::array<const char *, SNTP_SERVER_COUNT> servers_; std::array<const char *, SNTP_SERVER_COUNT> servers_;
bool has_time_{false}; bool has_time_{false};