-
Notifications
You must be signed in to change notification settings - Fork 18
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
guard against invalid response #38
Conversation
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.
Have you seen a old value that isn't zero? I think it was zero in your example. That might be a better case to detect than this one.
I've only seen zero. Could do that if it's what you'd like. |
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.
I think detecting zero would be clearer. Thanks!
This may get usurped by #39, which is totally fine. |
Test to ensure response value is valid. Intermittent seconds=0 value have been seen. fixes adafruit#35
4a078fc
to
a923944
Compare
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.
Simpler! Thank you!
Do you want to update this since #39 is merged? |
I don't know that the failure will be the same now that 39 is merged. It's probably these unpackings: https://github.com/adafruit/Adafruit_CircuitPython_NTP/pull/39/files#diff-2476a2f533d178076a598d69ec1dcb7c111cb00afe72382d2d68dcab2d9d0c8cR103 but I'm not confident on what's going to happen. So this can be closed. |
I know this is closed, but I just wanted to note that the seconds value of 0 is special in NTP:
|
Test to ensure response value is valid. Intermittent seconds=0 value have been seen.
fixes #35