-
Notifications
You must be signed in to change notification settings - Fork 115
Dev weather - linked to issue #287 / #298 / #288 plus additional feed #289
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
base: dev
Are you sure you want to change the base?
Conversation
Pagination of stocks
…gination Don't rotate stock pages if there is only 1
…ter-markdown-fixes Feature/megalinter markdown fixes
…eToDraw() and isItTimeToUpdate() methods to Widget.cpp. Changed WeatherWidget to add timers in its constructor. Changed WidgetSet to only call update and draw if the timers are expired.
|
This PR handles the following issues:
And includes a new feed from Pirate Weather |
…agement Consolidate Widget draw and update frequency management
Switch to new API provider for the timeZone information
flattermann
left a comment
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 would also comment out the WEATHER_* #defines in config.h.template so that the user can enable what he needs.
And move the default values to config.system.h (if #ifndef) because we might otherwise get compilation errors.
| #elif WEATHER_VISUALCROSSING_FEED | ||
| return new VisualCrossingFeed(WEATHER_VISUALCROSSING_API_KEY, weatherUnits); | ||
| #endif | ||
| switch (WEATHER_FEED) { |
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'm not 100% sure, but I think a switch might cause some problems here, because it might compile/link the unnecessary feeds as well? Needs testing.
We could switch to #if WEATHER_FEED == VISUALCROSSING if necessary (but we need to #define VISUALCROSSING 0 because enum items can't be used by the preprocessor)
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.
Thanks for your feedback, I'll look at your comments.
Did you look at the weather feed .h file, each has a #ifndef section to define the variables, thus I don't know if we need it in config.system.h as well
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.
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.
Right. If the defaults are already set in the individual feed .h, we don't need them in config.system.h.
Maybe include the feeds conditionally as well?
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 tested both way - switch and ifdef (including ifdef on the fee.h files) and it appears that all feeds are included in the compile / ink.. not sure if I was doing any incorrect, if you know a way, then I'm open to suggestions.

Move the variables for LAT and LOG to float for OpenWeathermap to floats