diff options
| author | KaffeinatedKat <coffeeboi47@protonmail.com> | 2023-09-29 21:00:07 -0600 |
|---|---|---|
| committer | JF <JF002@users.noreply.github.com> | 2024-08-05 20:32:43 +0200 |
| commit | 20ac7e8df38836d0a72c378b900b99c827c996c2 (patch) | |
| tree | 9e2b05866873cc1a540ffc71fe485c94362ce038 /src/components/settings/Settings.h | |
| parent | f8f8993fac0bdd022dc9ef41a67c0b558f29ba89 (diff) | |
feat: always on display
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 06312077..d75cd678 100644 --- a/src/components/settings/Settings.h +++ b/src/components/settings/Settings.h @@ -214,6 +214,17 @@ namespace Pinetime { return settings.screenTimeOut; }; + void SetAlwaysOnDisplay(bool state) { + if (state != settings.alwaysOnDisplay) { + settingsChanged = true; + } + settings.alwaysOnDisplay = state; + }; + + bool GetAlwaysOnDisplay() const { + return settings.alwaysOnDisplay; + }; + void SetShakeThreshold(uint16_t thresh) { if (settings.shakeWakeThreshold != thresh) { settings.shakeWakeThreshold = thresh; @@ -286,13 +297,15 @@ namespace Pinetime { private: Pinetime::Controllers::FS& fs; - static constexpr uint32_t settingsVersion = 0x0007; + static constexpr uint32_t settingsVersion = 0x0008; struct SettingsData { uint32_t version = settingsVersion; uint32_t stepsGoal = 10000; uint32_t screenTimeOut = 15000; + bool alwaysOnDisplay = false; + ClockType clockType = ClockType::H24; WeatherFormat weatherFormat = WeatherFormat::Metric; Notification notificationStatus = Notification::On; |
