From 28be2dc45013ae8d651647adba80dd63b9f7dcf8 Mon Sep 17 00:00:00 2001 From: JustScott Date: Thu, 3 Oct 2024 14:48:58 -0500 Subject: [PATCH] Add shorter/simpler weather condition options. --- src/displayapp/screens/WeatherSymbols.cpp | 25 +++++++++++++++++++++++ src/displayapp/screens/WeatherSymbols.h | 1 + 2 files changed, 26 insertions(+) diff --git a/src/displayapp/screens/WeatherSymbols.cpp b/src/displayapp/screens/WeatherSymbols.cpp index de66312f90..7a9272d9c7 100644 --- a/src/displayapp/screens/WeatherSymbols.cpp +++ b/src/displayapp/screens/WeatherSymbols.cpp @@ -59,3 +59,28 @@ 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: + return "Clouds"; + case Pinetime::Controllers::SimpleWeatherService::Icons::Clouds: + return "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"; + default: + return ""; + } +} diff --git a/src/displayapp/screens/WeatherSymbols.h b/src/displayapp/screens/WeatherSymbols.h index f3eeed5581..0fed0bdcea 100644 --- a/src/displayapp/screens/WeatherSymbols.h +++ b/src/displayapp/screens/WeatherSymbols.h @@ -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); } } }