Skip to content
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:
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudsSun:
return "Clear";
case Pinetime::Controllers::SimpleWeatherService::Icons::Clouds:
case Pinetime::Controllers::SimpleWeatherService::Icons::BrokenClouds:
return "Cloudy";
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudShowerHeavy:
return "Showers";
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudSunRain:
return "Rain";
case Pinetime::Controllers::SimpleWeatherService::Icons::Thunderstorm:
return "Thunder";
case Pinetime::Controllers::SimpleWeatherService::Icons::Snow:
return "Snow";
case Pinetime::Controllers::SimpleWeatherService::Icons::Smog:
return "Mist";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ("Mist") is the only questionable one. Based on the spec it seems like it should apply to anything that opacifies the atmosphere. However, most apps (and the spec icon itself) just rely on "mist" as a catch-all, so I guess it's fine.

Copy link
Member

@mark9064 mark9064 Nov 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I agree it's not great having to describe fog, mist, dust, smoke etc all with one word. I guess you could go for "Turbid" but that's probably overdoing it a bit... mist is probably the best catch all

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