mirror of
https://github.com/esphome/esphome.git
synced 2024-12-23 22:14:54 +01:00
last tv compilation error
This commit is contained in:
parent
3d351ce6c5
commit
db3266ac48
1 changed files with 3 additions and 1 deletions
|
@ -37,7 +37,7 @@ void SNTPComponent::setup() {
|
|||
}
|
||||
sntp_setoperatingmode(SNTP_OPMODE_POLL);
|
||||
g_sync_callback = [this](struct timeval *tv) {
|
||||
static struct timeval time_val = tv ? *tv : {};
|
||||
static struct timeval time_val;
|
||||
switch (sntp_get_sync_status()) {
|
||||
case SNTP_SYNC_STATUS_RESET:
|
||||
ESP_LOGD(TAG, "Time sync reset");
|
||||
|
@ -50,6 +50,8 @@ void SNTPComponent::setup() {
|
|||
ESP_LOGD(TAG, "Time sync in progress");
|
||||
break;
|
||||
}
|
||||
if (tv)
|
||||
time_val = *tv;
|
||||
};
|
||||
sntp_set_time_sync_notification_cb(sntp_sync_time_cb);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue