diff options
| author | JF <JF002@users.noreply.github.com> | 2022-01-04 20:44:36 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-04 20:44:36 (GMT) |
| commit | b8b54f47a2a09e32186bf7d8dddc658fae2c6e5f (patch) | |
| tree | 2b0d3f4873b54c388aa27d897e710665c857d321 /src/components/settings/Settings.h | |
| parent | e0013e730448f4dc142e3610f970f22c807ac41e (diff) | |
| parent | 15c3807a761b00a6dcdcc3a516e67e584f0a55c9 (diff) | |
Merge pull request #813 from SteveAmor/chimes
Chimes option
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 2d7973d..006b8c7 100644 --- a/src/components/settings/Settings.h +++ b/src/components/settings/Settings.h @@ -11,6 +11,7 @@ namespace Pinetime { public: enum class ClockType : uint8_t { H24, H12 }; enum class Notification : uint8_t { ON, OFF }; + enum class ChimesOption : uint8_t { None, Hours, HalfHours }; enum class WakeUpMode : uint8_t { SingleTap = 0, DoubleTap = 1, @@ -40,6 +41,16 @@ namespace Pinetime { return settings.clockFace; }; + void SetChimeOption(ChimesOption chimeOption) { + if (chimeOption != settings.chimesOption) { + settingsChanged = true; + } + settings.chimesOption = chimeOption; + }; + ChimesOption GetChimeOption() const { + return settings.chimesOption; + }; + void SetPTSColorTime(Colors colorTime) { if (colorTime != settings.PTS.ColorTime) settingsChanged = true; @@ -162,7 +173,7 @@ namespace Pinetime { private: Pinetime::Controllers::FS& fs; - static constexpr uint32_t settingsVersion = 0x0002; + static constexpr uint32_t settingsVersion = 0x0003; struct SettingsData { uint32_t version = settingsVersion; uint32_t stepsGoal = 10000; @@ -172,6 +183,7 @@ namespace Pinetime { Notification notificationStatus = Notification::ON; uint8_t clockFace = 0; + ChimesOption chimesOption = ChimesOption::None; PineTimeStyle PTS; |
