Skip to content
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

Adapt to newer version of Watchy library and use newer features from it #4

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

OlegGirko
Copy link

This change makes this watchface compile and work with the current version of Watchy library.

Also, it removes calculating sunrise and sunset times and specifying coordinates explicitly in favour of using this information from OpenWeatherMap data.

Oleg Girko added 3 commits July 23, 2024 20:03
It's Shanghai, not New York.

Signed-off-by: Oleg Girko <[email protected]>
Now latitude and longitude can be used instead of city ID to retrieve
weather information.
OpenWeaterMap API URL has been changed accordingly.

Also, locations of fields in watchySettings changed, so using explicit
field names to initialise them.

Signed-off-by: Oleg Girko <[email protected]>
This change removes calculations of sunrise and sunset time in favour of
getting this information from weather data.

This makes specifying exact latitude and longitude unnecessary: it's
enough to have OpenWeatherMap city ID.

As a nice side effect, this makes specifying timezone unnecessary as
well, because weather data contains current timezone information, and
Watchy::getWeatherData() sets timezone automatically.

Signed-off-by: Oleg Girko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant