-
-
Notifications
You must be signed in to change notification settings - Fork 970
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
Add shorter/simpler weather condition options. #2134
Open
JustScott
wants to merge
1
commit into
InfiniTimeOrg:main
Choose a base branch
from
JustScott:add_shorter_weather_condition_options
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,3 +59,26 @@ const char* Pinetime::Applications::Screens::Symbols::GetCondition(const Pinetim | |
return ""; | ||
} | ||
} | ||
|
||
const char* Pinetime::Applications::Screens::Symbols::GetSimpleCondition(const Pinetime::Controllers::SimpleWeatherService::Icons icon) { | ||
switch (icon) { | ||
case Pinetime::Controllers::SimpleWeatherService::Icons::Sun: | ||
return "Clear"; | ||
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudsSun: | ||
case Pinetime::Controllers::SimpleWeatherService::Icons::Clouds: | ||
case Pinetime::Controllers::SimpleWeatherService::Icons::BrokenClouds: | ||
return "Clouds"; | ||
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudShowerHeavy: | ||
return "Rain"; | ||
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudSunRain: | ||
return "Drizzle"; | ||
case Pinetime::Controllers::SimpleWeatherService::Icons::Thunderstorm: | ||
return "Thunder"; | ||
case Pinetime::Controllers::SimpleWeatherService::Icons::Snow: | ||
return "Snow"; | ||
case Pinetime::Controllers::SimpleWeatherService::Icons::Smog: | ||
return "Mist"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This ( |
||
default: | ||
return ""; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
To me drizzle is quite different from rain showers, it implies fine droplets at a low intensity whereas showers can be heavy but brief (more importantly one justifies an umbrella and the other might not!). I think "Showers" might fit better or just "Rain" even
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 agree, "Drizzle" should be changed to "Rain" in my opinion. I'm not a huge fan of "Shower" for the heavier rain case as I feel like that could be misinterpreted as a light shower as well as a heavy shower... perhaps we could change the GetCondition return to "Downpour" for CloudsShowerHeavy, and make it "Pour" for GetSimpleCondition? Just a suggestion, not sure how everyone would interpret "Pour" though.
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.
These conditions are determined directly from the OpenWeather condition codes (which is also what Gadgetbridge uses). The actual API has a higher level of precision (light drizzle vs heavy shower and so on), but the weather apps compatible with Gadgetbridge for the most part only support a handful of the condition codes in the spec.
I would not recommend deviating from this spec, as it would compound the delta between the weather app and gadgetbridge...