From 94f41258d52102dc4863d964d43794b34f26cf41 Mon Sep 17 00:00:00 2001 From: kieranc Date: Sun, 4 Jun 2023 16:52:31 +0200 Subject: PineTimeStyle weather display (#1459) Weather display for PineTimeStyle Documentation : https://wiki.pine64.org/wiki/PineTimeStyle and https://wiki.pine64.org/wiki/Infinitime-Weather --- src/components/settings/Settings.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/components/settings') diff --git a/src/components/settings/Settings.h b/src/components/settings/Settings.h index 0a55c08a..efa44fde 100644 --- a/src/components/settings/Settings.h +++ b/src/components/settings/Settings.h @@ -39,12 +39,14 @@ namespace Pinetime { Pink }; enum class PTSGaugeStyle : uint8_t { Full, Half, Numeric }; + enum class PTSWeather : uint8_t { On, Off }; struct PineTimeStyle { Colors ColorTime = Colors::Teal; Colors ColorBar = Colors::Teal; Colors ColorBG = Colors::Black; PTSGaugeStyle gaugeStyle = PTSGaugeStyle::Full; + PTSWeather weatherEnable = PTSWeather::Off; }; struct WatchFaceInfineat { @@ -146,6 +148,16 @@ namespace Pinetime { return settings.PTS.gaugeStyle; }; + void SetPTSWeather(PTSWeather weatherEnable) { + if (weatherEnable != settings.PTS.weatherEnable) + settingsChanged = true; + settings.PTS.weatherEnable = weatherEnable; + }; + + PTSWeather GetPTSWeather() const { + return settings.PTS.weatherEnable; + }; + void SetAppMenu(uint8_t menu) { appMenu = menu; }; @@ -267,7 +279,7 @@ namespace Pinetime { private: Pinetime::Controllers::FS& fs; - static constexpr uint32_t settingsVersion = 0x0004; + static constexpr uint32_t settingsVersion = 0x0005; struct SettingsData { uint32_t version = settingsVersion; -- cgit v1.2.3-70-g09d2