diff options
| author | Jean-François Milants <jf@codingfield.com> | 2021-03-20 10:41:49 (GMT) |
|---|---|---|
| committer | Jean-François Milants <jf@codingfield.com> | 2021-03-20 10:41:49 (GMT) |
| commit | 405c85c160b0d72407498a25555677d484b822f1 (patch) | |
| tree | 71b22af329f7b5ee7a6f37ddca4c738f0e379593 /src/components/settings | |
| parent | e63596b291f973cdeb01cd0ac276861895bd4489 (diff) | |
| parent | 9e9bb2085e70a9c8b8c2e74f6027f5392e366158 (diff) | |
Merge branch 'develop' of github.com:JF002/Pinetime into develop
# Conflicts:
# src/main.cpp
# src/systemtask/SystemTask.h
Diffstat (limited to 'src/components/settings')
| -rw-r--r-- | src/components/settings/Settings.cpp | 16 | ||||
| -rw-r--r-- | src/components/settings/Settings.h | 30 |
2 files changed, 46 insertions, 0 deletions
diff --git a/src/components/settings/Settings.cpp b/src/components/settings/Settings.cpp new file mode 100644 index 0000000..0c6cf61 --- /dev/null +++ b/src/components/settings/Settings.cpp @@ -0,0 +1,16 @@ +#include "Settings.h" + +using namespace Pinetime::Controllers; + + +// TODO (team): +// Read and write the settings to Flash +// +void Settings::Init() { + // default Clock face + clockFace = 0; + + clockType = ClockType::H24; + +} + diff --git a/src/components/settings/Settings.h b/src/components/settings/Settings.h new file mode 100644 index 0000000..fa67f35 --- /dev/null +++ b/src/components/settings/Settings.h @@ -0,0 +1,30 @@ +#pragma once +#include <cstdint> + +namespace Pinetime { + namespace Controllers { + class Settings { + public: + enum class ClockType {H24, H12}; + + void Init(); + + void SetClockFace( uint8_t face ) { clockFace = face; }; + uint8_t GetClockFace() { return clockFace; }; + + void SetAppMenu( uint8_t menu ) { appMenu = menu; }; + uint8_t GetAppMenu() { return appMenu; }; + + void SetClockType( ClockType clocktype ) { clockType = clocktype; }; + ClockType GetClockType() { return clockType; }; + + + private: + uint8_t clockFace = 0; + uint8_t appMenu = 0; + + ClockType clockType = ClockType::H24; + + }; + } +}
\ No newline at end of file |
