diff options
| author | JF <jf@codingfield.com> | 2021-09-02 18:35:56 (GMT) |
|---|---|---|
| committer | Gitea <gitea@fake.local> | 2021-09-02 18:35:56 (GMT) |
| commit | 6c3d6fb2575888e582e7ef3004a0bc3bf6c588b6 (patch) | |
| tree | ac396c060b423dd98fd915e742c14fc457a6f6d9 /src/components/settings | |
| parent | db6a701644116932f11c54ee0f619464de9faeb7 (diff) | |
| parent | 6f9f0e8b0e42a5526d47ca664534fb6b0ccb6ace (diff) | |
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/components/settings')
| -rw-r--r-- | src/components/settings/Settings.h | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/src/components/settings/Settings.h b/src/components/settings/Settings.h index 93d6d21..a294ab7 100644 --- a/src/components/settings/Settings.h +++ b/src/components/settings/Settings.h @@ -17,6 +17,14 @@ namespace Pinetime { DoubleTap = 1, RaiseWrist = 2, }; + enum class Colors : uint8_t { + White, Silver, Gray, Black, Red, Maroon, Yellow, Olive, Lime, Green, Cyan, Teal, Blue, Navy, Magenta, Purple, Orange + }; + struct PineTimeStyle { + Colors ColorTime = Colors::Teal; + Colors ColorBar = Colors::Teal; + Colors ColorBG = Colors::Black; + }; Settings(Pinetime::Controllers::FS& fs); @@ -33,10 +41,38 @@ namespace Pinetime { return settings.clockFace; }; + void SetPTSColorTime(Colors colorTime) { + if (colorTime != settings.PTS.ColorTime) + settingsChanged = true; + settings.PTS.ColorTime = colorTime; + }; + Colors GetPTSColorTime() const { + return settings.PTS.ColorTime; + }; + + void SetPTSColorBar(Colors colorBar) { + if (colorBar != settings.PTS.ColorBar) + settingsChanged = true; + settings.PTS.ColorBar = colorBar; + }; + Colors GetPTSColorBar() const { + return settings.PTS.ColorBar; + }; + + void SetPTSColorBG(Colors colorBG) { + if (colorBG != settings.PTS.ColorBG) + settingsChanged = true; + settings.PTS.ColorBG = colorBG; + }; + Colors GetPTSColorBG() const { + return settings.PTS.ColorBG; + }; + void SetAppMenu(uint8_t menu) { appMenu = menu; }; - uint8_t GetAppMenu() { + + uint8_t GetAppMenu() const { return appMenu; }; @@ -127,9 +163,8 @@ namespace Pinetime { private: Pinetime::Controllers::FS& fs; - static constexpr uint32_t settingsVersion = 0x0001; + static constexpr uint32_t settingsVersion = 0x0002; struct SettingsData { - uint32_t version = settingsVersion; uint32_t stepsGoal = 10000; uint32_t screenTimeOut = 15000; @@ -139,6 +174,8 @@ namespace Pinetime { uint8_t clockFace = 0; + PineTimeStyle PTS; + std::bitset<3> wakeUpMode {0}; Controllers::BrightnessController::Levels brightLevel = Controllers::BrightnessController::Levels::Medium; |
