Skip to content

Commit

Permalink
delay longer to get NTP response
Browse files Browse the repository at this point in the history
  • Loading branch information
vitotai committed Jan 20, 2024
1 parent 9345be3 commit 7abb62a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#sonoff OTA no longer supported, classic interface no longer supported
#default_envs = esp32, esp32-oled, esp8266, esp8266-oled, esp8266-tw, esp8266-spanish, esp8266-portuguese-br, esp8266-slovak, esp8266-ispindel, esp8266-it, esp8266-norwegian, thorrax, sonoff, sonoff-esp8285, d1pro, sonoff-am2301
#default_envs = esp32-dev
default_envs = esp8266-dev
default_envs = esp8266
#default_envs = esp8266

include_dir= wdoc/
Expand Down
4 changes: 2 additions & 2 deletions src/TimeKeeper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ time_t TimeKeeperClass::_queryServer(void){
time_t secs=0;

int trial;
for(trial=0;trial< 25;trial++)
for(trial=0;trial< 20;trial++)
{
#ifdef ESP32
time(&secs);
Expand All @@ -60,7 +60,7 @@ time_t TimeKeeperClass::_queryServer(void){
_ntpSynced=true;
break;
}
delay(200);
delay(750);
}
return secs;
}
Expand Down

0 comments on commit 7abb62a

Please sign in to comment.