-
Notifications
You must be signed in to change notification settings - Fork 18
Use UDP to talk to NTP servers #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This completely redoes the library in favor of using a native socket to fetch time from an NTP server. Fixes adafruit#17 and fixes adafruit#16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good - since the readme example was deleted, can you add an example for using with esp32spi?
I'm not sure it works with ESP32SPI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gtg!
Updating https://github.com/adafruit/Adafruit_CircuitPython_NTP to 3.0.0 from 2.2.6: > Merge pull request adafruit/Adafruit_CircuitPython_NTP#20 from tannewt/raw_ntp > Patch .pre-commit-config.yaml > change discord badge > Patch: Replaced discord badge image > Updated gitignore > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README
Any chance you could add a socket timeout? My code frequently hangs during the ntp call (eg if the connection is lost), but passing a timeout can resolve this, ie. put a socket_timeout as an additional argument and then call sock.settimeout(self._socket_timeout) before the sock.sendto |
Please open an issue. They are much easier to track than comments on merged PRs. I don't plan on adding a timeout soon but am happy to help you do it. Let's sync on the issue. |
This completely redoes the library in favor of using a native
socket to fetch time from an NTP server.
Fixes #17 and fixes #16