diff options
Diffstat (limited to 'src/components/settings/Settings.h')
| -rw-r--r-- | src/components/settings/Settings.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/components/settings/Settings.h b/src/components/settings/Settings.h index 89c2ba97..06312077 100644 --- a/src/components/settings/Settings.h +++ b/src/components/settings/Settings.h @@ -10,6 +10,7 @@ namespace Pinetime { class Settings { public: enum class ClockType : uint8_t { H24, H12 }; + enum class WeatherFormat : uint8_t { Metric, Imperial }; enum class Notification : uint8_t { On, Off, Sleep }; enum class ChimesOption : uint8_t { None, Hours, HalfHours }; enum class WakeUpMode : uint8_t { SingleTap = 0, DoubleTap = 1, RaiseWrist = 2, Shake = 3, LowerWrist = 4 }; @@ -180,6 +181,17 @@ namespace Pinetime { return settings.clockType; }; + void SetWeatherFormat(WeatherFormat weatherFormat) { + if (weatherFormat != settings.weatherFormat) { + settingsChanged = true; + } + settings.weatherFormat = weatherFormat; + }; + + WeatherFormat GetWeatherFormat() const { + return settings.weatherFormat; + }; + void SetNotificationStatus(Notification status) { if (status != settings.notificationStatus) { settingsChanged = true; @@ -274,7 +286,7 @@ namespace Pinetime { private: Pinetime::Controllers::FS& fs; - static constexpr uint32_t settingsVersion = 0x0006; + static constexpr uint32_t settingsVersion = 0x0007; struct SettingsData { uint32_t version = settingsVersion; @@ -282,6 +294,7 @@ namespace Pinetime { uint32_t screenTimeOut = 15000; ClockType clockType = ClockType::H24; + WeatherFormat weatherFormat = WeatherFormat::Metric; Notification notificationStatus = Notification::On; Pinetime::Applications::WatchFace watchFace = Pinetime::Applications::WatchFace::Digital; |
