mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01:00
Compilation error 2
This commit is contained in:
parent
099982dd07
commit
5035a1f40e
1 changed files with 7 additions and 1 deletions
|
@ -54,7 +54,13 @@ void SNTPComponent::setup() {
|
||||||
sntp_set_sync_interval(this->get_update_interval());
|
sntp_set_sync_interval(this->get_update_interval());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_sync_callback = [this](struct timeval *tv) { callback_args_.push_back({tv ? *tv : {}, sntp_get_sync_status()}); };
|
g_sync_callback = [](struct timeval *tv) {
|
||||||
|
callback_args_.push_back({});
|
||||||
|
if (tv)
|
||||||
|
callback_args_.back().first = *tv;
|
||||||
|
callback_args_.back().second = sntp_get_sync_status();
|
||||||
|
};
|
||||||
|
|
||||||
ESP_LOGD(TAG, "Set notification callback");
|
ESP_LOGD(TAG, "Set notification callback");
|
||||||
sntp_set_time_sync_notification_cb(sntp_sync_time_cb);
|
sntp_set_time_sync_notification_cb(sntp_sync_time_cb);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue