diff options
| author | JF <JF002@users.noreply.github.com> | 2022-09-27 21:27:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-27 21:27:36 +0200 |
| commit | 63932810d2707e6c530dae64b209ac240137dc17 (patch) | |
| tree | c6b6b10268726781ce6ee9ef8b64c99680e11ae5 /src/components/settings/Settings.h | |
| parent | f699261ca326c76b72a864cb9576cf4c69bd5474 (diff) | |
| parent | 58586d0ad1ebeefd7a6f269089f467ccba2f468c (diff) | |
Merge pull request #1024 from dmlls/infineat-pr
Infineat Watchface + support for external resources.
Diffstat (limited to 'src/components/settings/Settings.h')
| -rw-r--r-- | src/components/settings/Settings.h | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/src/components/settings/Settings.h b/src/components/settings/Settings.h index 1262eb88..79f121d1 100644 --- a/src/components/settings/Settings.h +++ b/src/components/settings/Settings.h @@ -42,6 +42,10 @@ namespace Pinetime { Colors ColorBar = Colors::Teal; Colors ColorBG = Colors::Black; }; + struct WatchFaceInfineat { + bool showSideCover = true; + int colorIndex = 0; + }; Settings(Pinetime::Controllers::FS& fs); @@ -95,6 +99,26 @@ namespace Pinetime { return settings.PTS.ColorBG; }; + void SetInfineatShowSideCover(bool show) { + if (show != settings.watchFaceInfineat.showSideCover) { + settings.watchFaceInfineat.showSideCover = show; + settingsChanged = true; + } + }; + bool GetInfineatShowSideCover() const { + return settings.watchFaceInfineat.showSideCover; + }; + + void SetInfineatColorIndex(int index) { + if (index != settings.watchFaceInfineat.colorIndex) { + settings.watchFaceInfineat.colorIndex = index; + settingsChanged = true; + } + }; + int GetInfineatColorIndex() const { + return settings.watchFaceInfineat.colorIndex; + }; + void SetAppMenu(uint8_t menu) { appMenu = menu; }; @@ -110,6 +134,14 @@ namespace Pinetime { return settingsMenu; }; + void SetWatchfacesMenu(uint8_t menu) { + watchFacesMenu = menu; + }; + + uint8_t GetWatchfacesMenu() const { + return watchFacesMenu; + }; + void SetClockType(ClockType clocktype) { if (clocktype != settings.clockType) { settingsChanged = true; @@ -213,7 +245,7 @@ namespace Pinetime { private: Pinetime::Controllers::FS& fs; - static constexpr uint32_t settingsVersion = 0x0003; + static constexpr uint32_t settingsVersion = 0x0004; struct SettingsData { uint32_t version = settingsVersion; uint32_t stepsGoal = 10000; @@ -227,6 +259,8 @@ namespace Pinetime { PineTimeStyle PTS; + WatchFaceInfineat watchFaceInfineat; + std::bitset<4> wakeUpMode {0}; uint16_t shakeWakeThreshold = 150; Controllers::BrightnessController::Levels brightLevel = Controllers::BrightnessController::Levels::Medium; @@ -237,6 +271,7 @@ namespace Pinetime { uint8_t appMenu = 0; uint8_t settingsMenu = 0; + uint8_t watchFacesMenu = 0; /* ble state is intentionally not saved with the other watch settings and initialized * to off (false) on every boot because we always want ble to be enabled on startup */ |
