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

Add shorter/simpler weather condition options. #2134

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/displayapp/screens/WeatherSymbols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Copy link
Member

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

case Pinetime::Controllers::SimpleWeatherService::Icons::Thunderstorm:
return "Thunder";
case Pinetime::Controllers::SimpleWeatherService::Icons::Snow:
return "Snow";
case Pinetime::Controllers::SimpleWeatherService::Icons::Smog:
return "Mist";
default:
return "";
}
}
1 change: 1 addition & 0 deletions src/displayapp/screens/WeatherSymbols.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace Pinetime {
namespace Symbols {
const char* GetSymbol(const Pinetime::Controllers::SimpleWeatherService::Icons icon);
const char* GetCondition(const Pinetime::Controllers::SimpleWeatherService::Icons icon);
const char* GetSimpleCondition(const Pinetime::Controllers::SimpleWeatherService::Icons icon);
}
}
}
Expand Down
Loading