No reviewers
Labels
No labels
bug
conflicts
documentation
DO NOT MERGE
duplicate
enhancement
good first issue
hardware
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
greg/info-orbs!289
Loading…
Reference in a new issue
No description provided.
Delete branch "nconner-06/dev_weather"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Move the variables for LAT and LOG to float for OpenWeathermap to floats
This PR handles the following issues:
And includes a new feed from Pirate Weather
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.@ -35,22 +35,30 @@#define DEFAULT_CLOCK ClockType::NORMAL // Set the default clock face: ClockType::NORMAL, ClockType::NIXIE or ClockType::CUSTOM0..9The enum should not be defined in
config.h.template.Maybe move it to
WeatherWidget.h?The API URLs should be moved to config.system.h (with ifndef), because a user shouldn't need to override these.
The visual crossing API key can also be moved to
config.system.h(with ifndef, so that it could be overriden here)The three other
WEATHER_VISUALCROSSUNG_*defs should have a default inconfig.system.h(because we want to be able to build withoutconfig.h@ -42,4 +40,4 @@#define WEATHER_SCREEN_MODE Dark // Can be either Light or Dark#define WEATHER_UNITS_METRIC // Comment this line out (or delete it) if you want imperial units for the weather#define HIGH_LOW_INTERVAL 0 // Switch between Highs and Lows on 3 day forecast in X seconds - set to 0 to disableWEATHER_FEED needs a default in
config.system.h(forconfig.hless builds)I'm not 100% sure, but I think a
switchmight cause some problems here, because it might compile/link the unnecessary feeds as well? Needs testing.We could switch to
#if WEATHER_FEED == VISUALCROSSINGif necessary (but we need to#define VISUALCROSSING 0because enum items can't be used by the preprocessor)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
@ -35,22 +35,30 @@#define DEFAULT_CLOCK ClockType::NORMAL // Set the default clock face: ClockType::NORMAL, ClockType::NIXIE or ClockType::CUSTOM0..9the API key for VisualCrossing should be user editable - people can get their own keys (if they want) - like for the other feeds. It's just we provide a key to get them started..
As the header files for all the feeds are included in WeatherWidget.cpp, it looks like all the feeds get compiled and linked - even if I change to a "#if" condition...

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?
@ -35,22 +35,30 @@#define DEFAULT_CLOCK ClockType::NORMAL // Set the default clock face: ClockType::NORMAL, ClockType::NIXIE or ClockType::CUSTOM0..9moved to WeatherWideget.h
@ -35,22 +35,30 @@#define DEFAULT_CLOCK ClockType::NORMAL // Set the default clock face: ClockType::NORMAL, ClockType::NIXIE or ClockType::CUSTOM0..9all URLs moved to their respective feed.h files
@ -35,22 +35,30 @@#define DEFAULT_CLOCK ClockType::NORMAL // Set the default clock face: ClockType::NORMAL, ClockType::NIXIE or ClockType::CUSTOM0..9VisualCrossing API key left in config.h.template because users can have their own, but the default (provided) key is in the visualcrossing feed with an #ifndef condition
@ -35,22 +35,30 @@#define DEFAULT_CLOCK ClockType::NORMAL // Set the default clock face: ClockType::NORMAL, ClockType::NIXIE or ClockType::CUSTOM0..9all defaults are in their respective feed.h file, all customizable variables are in the config.h.template.
for me, config.systel.h should be for non-widget variables
@ -42,4 +40,4 @@#define WEATHER_SCREEN_MODE Dark // Can be either Light or Dark#define WEATHER_UNITS_METRIC // Comment this line out (or delete it) if you want imperial units for the weather#define HIGH_LOW_INTERVAL 0 // Switch between Highs and Lows on 3 day forecast in X seconds - set to 0 to disabledefault is set in WeatherWidget.h, just below the enum which defines the available values
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.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.