Skip to content

Commit 1b4c981

Browse files
committed
Add shorter/simpler weather condition options.
1 parent 7b39d81 commit 1b4c981

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/displayapp/screens/WeatherSymbols.cpp

+23
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,26 @@ const char* Pinetime::Applications::Screens::Symbols::GetCondition(const Pinetim
5959
return "";
6060
}
6161
}
62+
63+
const char* Pinetime::Applications::Screens::Symbols::GetSimpleCondition(const Pinetime::Controllers::SimpleWeatherService::Icons icon) {
64+
switch (icon) {
65+
case Pinetime::Controllers::SimpleWeatherService::Icons::Sun:
66+
return "Clear";
67+
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudsSun:
68+
case Pinetime::Controllers::SimpleWeatherService::Icons::Clouds:
69+
case Pinetime::Controllers::SimpleWeatherService::Icons::BrokenClouds:
70+
return "Clouds";
71+
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudShowerHeavy:
72+
return "Rain";
73+
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudSunRain:
74+
return "Drizzle";
75+
case Pinetime::Controllers::SimpleWeatherService::Icons::Thunderstorm:
76+
return "Thunder";
77+
case Pinetime::Controllers::SimpleWeatherService::Icons::Snow:
78+
return "Snow";
79+
case Pinetime::Controllers::SimpleWeatherService::Icons::Smog:
80+
return "Mist";
81+
default:
82+
return "";
83+
}
84+
}

src/displayapp/screens/WeatherSymbols.h

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace Pinetime {
88
namespace Symbols {
99
const char* GetSymbol(const Pinetime::Controllers::SimpleWeatherService::Icons icon);
1010
const char* GetCondition(const Pinetime::Controllers::SimpleWeatherService::Icons icon);
11+
const char* GetSimpleCondition(const Pinetime::Controllers::SimpleWeatherService::Icons icon);
1112
}
1213
}
1314
}

0 commit comments

Comments
 (0)