-
Notifications
You must be signed in to change notification settings - Fork 86
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
RTC and Adafruit IO related improvements #132
Conversation
@@ -172,6 +172,8 @@ def connect_to_wifi(): | |||
|
|||
logging.info(" - ip address: ", ip) | |||
""" | |||
import rp2 | |||
rp2.country("GB") |
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.
This should probably be a config setting. It may create wifi connection issues in other countries.
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.
This would have been a good thing for me to think of before merging the pull request 🤦. Any chance you can raise an issue for it, or perhaps a PR yourself if have the time?
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.
Sure, I may have some time this weekend to create a pull request to use a config setting. For now do you think just removing these two lines will be enough?
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.
You can remove them on your local copy if they're causing issues. There's no urgency to remove them from this repository though, as most people download versions from the releases tab.
Adafruit IO destination now specifically checks for the "data in the future" error, and if encountered triggers an RTC resync on the next boot.
To achieve this, the boards now write a file upon RTC sync with the time of that sync. This file is used in addition to the previous "year 2020 or before" to trigger a resync. For instance, if the file is missing or deleted (as is done with this Adafruit IO case), then a resync is forced. Additionally, a resync is triggered after a user defined number of hours. By default this is set to 1 week.
Additionally, this PR fixes two other minor issues with the RTC: