mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01:00
Make it build 6
This commit is contained in:
parent
73a473e389
commit
a3e3f37445
1 changed files with 3 additions and 3 deletions
|
@ -63,9 +63,9 @@ void SNTPComponent::dump_config() {
|
||||||
ESP_LOGCONFIG(TAG, " Server 3: '%s'", this->server_3_.c_str());
|
ESP_LOGCONFIG(TAG, " Server 3: '%s'", this->server_3_.c_str());
|
||||||
ESP_LOGCONFIG(TAG, " Timezone: '%s'", this->timezone_.c_str());
|
ESP_LOGCONFIG(TAG, " Timezone: '%s'", this->timezone_.c_str());
|
||||||
}
|
}
|
||||||
void set_servers(const std::string &server_1, const std::string &server_2, const std::string &server_3) {
|
void SNTPComponent::set_servers(const std::string &server_1, const std::string &server_2, const std::string &server_3) {
|
||||||
#if !defined(USE_HOST)
|
#if !defined(USE_HOST)
|
||||||
if (servers_was_setup_) {
|
if (this->servers_was_setup_) {
|
||||||
for (uint8_t i = 0; i < 3; ++i) {
|
for (uint8_t i = 0; i < 3; ++i) {
|
||||||
const auto &buff = this->servers_[i].empty() ? nullptr : this->servers_[i].c_str();
|
const auto &buff = this->servers_[i].empty() ? nullptr : this->servers_[i].c_str();
|
||||||
if (buff != nullptr && buff == sntp_getservername(i))
|
if (buff != nullptr && buff == sntp_getservername(i))
|
||||||
|
@ -77,7 +77,7 @@ void set_servers(const std::string &server_1, const std::string &server_2, const
|
||||||
this->servers_ = {server_1, server_2, server_3};
|
this->servers_ = {server_1, server_2, server_3};
|
||||||
#if !defined(USE_HOST)
|
#if !defined(USE_HOST)
|
||||||
if (this->servers_was_setup_) {
|
if (this->servers_was_setup_) {
|
||||||
setup_servers_();
|
this->setup_servers_();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue