diff options
| author | kieranc <kieranc@gmail.com> | 2023-06-04 16:52:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-04 16:52:31 +0200 |
| commit | 94f41258d52102dc4863d964d43794b34f26cf41 (patch) | |
| tree | b4ca7ee44ea2531ca326487966c7a1b1c2b4ebe5 /src/components/settings/Settings.h | |
| parent | 394f58fbb246a3b54a409bf94d85aa7d63b88a2c (diff) | |
PineTimeStyle weather display (#1459)
Weather display for PineTimeStyle
Documentation : https://wiki.pine64.org/wiki/PineTimeStyle and https://wiki.pine64.org/wiki/Infinitime-Weather
Diffstat (limited to 'src/components/settings/Settings.h')
| -rw-r--r-- | src/components/settings/Settings.h | 14 |
1 files changed, 13 insertions, 1 deletions
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; |
