mirror of
https://github.com/esphome/esphome.git
synced 2024-11-30 18:54:14 +01:00
Replace ifdef with defined()
This commit is contained in:
parent
ddc3e65e40
commit
547517450d
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ class SNTPComponent : public time::RealTimeClock {
|
||||||
|
|
||||||
void update() override;
|
void update() override;
|
||||||
void loop() override;
|
void loop() override;
|
||||||
#ifdef USE_ESP_IDF
|
#if defined(USE_ESP_IDF)
|
||||||
void set_update_interval(uint32_t update_interval) override;
|
void set_update_interval(uint32_t update_interval) override;
|
||||||
uint32_t get_update_interval() const override;
|
uint32_t get_update_interval() const override;
|
||||||
#endif
|
#endif
|
||||||
|
@ -35,7 +35,7 @@ class SNTPComponent : public time::RealTimeClock {
|
||||||
std::string servers_[3];
|
std::string servers_[3];
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#ifdef USE_ESP_IDF
|
#if defined(USE_ESP_IDF)
|
||||||
bool has_time_{false};
|
bool has_time_{false};
|
||||||
#endif
|
#endif
|
||||||
bool servers_was_setup_{false};
|
bool servers_was_setup_{false};
|
||||||
|
|
Loading…
Reference in a new issue