summaryrefslogtreecommitdiff
path: root/src/components/settings
diff options
context:
space:
mode:
authorJoaquim <joaquim.org@gmail.com>2021-02-24 19:40:24 +0000
committerJoaquim <joaquim.org@gmail.com>2021-02-24 19:40:24 +0000
commit8c53d0b70baa03c2b07360444a7cd0ad99bb8381 (patch)
tree52585926f2abc810b2b93475dfb2580e6ea19f85 /src/components/settings
parentc18f4e5811dbd388e3b4acc29b1fab68279ec405 (diff)
Multi face support, analog clock, 12/24 config
Diffstat (limited to 'src/components/settings')
-rw-r--r--src/components/settings/Settings.cpp18
-rw-r--r--src/components/settings/Settings.h30
2 files changed, 48 insertions, 0 deletions
diff --git a/src/components/settings/Settings.cpp b/src/components/settings/Settings.cpp
new file mode 100644
index 00000000..87cfe885
--- /dev/null
+++ b/src/components/settings/Settings.cpp
@@ -0,0 +1,18 @@
+#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 00000000..fa67f35e
--- /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