Jeff Kletsky
86fa1add10
extras/sntp: SNTP_LOGD_WITH_PRINTF enables logging
...
Can continue to define own SNTP_LOGD
2018-02-08 21:05:36 -08:00
Jeff Kletsky
cf112955ed
extras/sntp: Disable SNTP_LOGD by default
...
Also correct #ifdef inclusion based on #defined SNTP_LOGD
2018-02-06 22:32:34 -08:00
Jeff Kletsky
43b3df2cdf
extras/sntp: initialize "cal" properly
...
Call sdk_system_rtc_clock_cali_proc()
rather than just setting to 1
2018-02-06 22:15:54 -08:00
Jeff Kletsky
5ef8a8348a
extras/sntp: Correct miscalculation of tv_usec
...
Missing >>12 inserted
2018-02-06 22:15:54 -08:00
Jeff Kletsky
f328da17c1
extras/sntp: Enhance logging, when enabled
...
Log adustment in seconds, time since last update,
resulting ppm, and RTC "cal" value
Note that the cal value is *prior* to the update
2018-02-06 22:15:44 -08:00
Jeff Kletsky
dba2d93c21
extras/sntp: Capture RTC counts immediately on update
...
Get the "best value" rather than waiting for logging
2018-02-06 22:00:28 -08:00
Jeff Kletsky
7821c098d8
extras/sntp: SNTP_LOGD #define; fix format string for drift
...
Allow user to define a printf()-like function
to be sued for logging; disable logging if not defined
esp-open-rtos implementation of printf()
generally can't handle uint64_t -- See Issue #561
use (long double) to represent the time error in ticks
2018-02-06 22:00:18 -08:00
Ivan Mikhailov
69220ee866
Allow overrides of sntp.h
...
Changed quote marks with triangle brackets
for sntp.h to allow user creating a custom sntp.h
2017-12-07 20:55:03 +01:00
Our Air Quality
6080bb6ef2
libc: update to upstream master.
2017-09-21 23:44:24 +10:00
Our Air Quality
cd23acaa4a
LwIP v2 support
2017-08-30 13:51:32 +10:00
funnydog
65a0c95b13
extras/sntp: fix an off-by-one bug in sntp_set_servers()
...
The function sntp_set_servers() duplicates the strings supplied in the
server_url[] array into new strings but forgets to allocate the extra
byte needed for the \0 terminator for each string.
Fix the problem by using strdup(), which allocates the right amount of
memory and copies the string at once.
2017-03-14 20:32:51 +01:00
iosen
37180024f4
sntp: free the pbuf after sending the request
...
Fixes a memory leak.
2016-06-26 21:36:04 +10:00
doragasu
11c9031d9b
Removed my _time() implementation to use newlib provided one.
2016-03-31 16:05:15 +02:00
doragasu
9651692ca2
Cleanup and some changes to make implementation a bit more conforming to the standard.
2016-03-13 18:29:30 +01:00
doragasu
f14025b1c7
Removed non working clock_* calls from example. Using vars for tz and dst.
2016-03-13 17:04:03 +01:00
doragasu
0482aebf7d
Added quick and dirty _gettimeofday_r() test implementation.
2016-03-11 13:11:15 +01:00
doragasu
16c831fffa
Added sntp support and example
2016-03-09 17:18:51 +01:00