lmirel / MorphingClockRemix

a remix on the work of HarryFun's MorphingClock
https://www.instructables.com/id/Morphing-Digital-Clock/
78 stars 30 forks source link

Time Sync error: Got NTP time: 00:32:34 11/05/2019 #18

Closed Robiv8 closed 5 years ago

Robiv8 commented 5 years ago

Have this error? but the time is correct in the display

00:32:24.018 -> i:connecting to weather server.. connected.
00:32:34.162 -> weather:{"coord":{"lon":9.18,"lat":48.78},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"base":"stations","main":{"temp":10.55,"pressure":1012,"humidity":81,"temp_min":7.78,"temp_max":12.22},"visibility":10000,"wind":{"speed":1.5,"deg":90},"clouds":{"all":0},"dt":1557526957,"sys":{"type":1,"id":1274,"message":0.0063,"country":"DE","sunrise":1557546478,"sunset":1557600685},"id":2825297,"name":"Stuttgart","cod":200}
00:32:34.232 -> cond Clear
00:32:34.232 -> condM 1
00:32:34.232 -> temp: 10.55
00:32:34.232 -> temp min: 7.78
00:32:34.232 -> temp max: 12.22
00:32:34.232 -> press 1012
00:32:34.232 -> humi 81
00:32:34.232 -> *WM: freeing allocated params!
00:32:34.516 -> display color range [0 .. 65535]
00:32:34.516 -> Time Sync error: Got NTP time: 00:32:34 11/05/2019
00:32:34.869 -> showing the weather
00:32:34.869 -> temperature: 10C
00:32:34.869 -> weather conditions 1
00:32:34.869 -> showing the date
00:32:35.210 -> showing the weather
lmirel commented 5 years ago

from NTP client lib I see that the possible 'errors' are:

typedef enum { timeSyncd, // Time successfully got from NTP server noResponse, // No response from server invalidAddress // Address not reachable } NTPSyncEvent_t;

In your case, the 'error' is timeSyncd and it fires twice (no error the 2nd time), that's why you have your clock up to date. this part of the code is from its examples and I might fix it sometime. for now there's no function loss.

cheers