summaryrefslogtreecommitdiff
path: root/src/components/settings
diff options
context:
space:
mode:
authorNiall Cooling <niallcooling@gmail.com>2021-03-22 17:23:49 +0000
committerNiall Cooling <niallcooling@gmail.com>2021-03-22 17:23:49 +0000
commite5e3fc02b8a2adf9ea100c162d1290cecdf617ef (patch)
tree78d4da0239ff8bf7a8694c28f804f81d2496979f /src/components/settings
parent14bd790701f4e2f6d75ef8a1f52b9f38023c2dd9 (diff)
parent9f9d0eb5df8ff86b9cd1e095afa3159094dde53c (diff)
Updated to include WatchFaceAnalog and fixed clashes
Diffstat (limited to 'src/components/settings')
-rw-r--r--src/components/settings/Settings.cpp16
-rw-r--r--src/components/settings/Settings.h30
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 00000000..0c6cf610
--- /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 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