From 020a7fd11d1b18fd7ac29ccc00b9c6f6e0cdb17b Mon Sep 17 00:00:00 2001 From: Max Friedrich Date: Sun, 30 Apr 2023 17:03:46 +0200 Subject: Refactor watch face to enum (#1339) change watch face from int to enum --------- Co-authored-by: minacode --- src/components/settings/Settings.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/components') diff --git a/src/components/settings/Settings.h b/src/components/settings/Settings.h index d1e71656..0a55c08a 100644 --- a/src/components/settings/Settings.h +++ b/src/components/settings/Settings.h @@ -3,6 +3,7 @@ #include #include "components/brightness/BrightnessController.h" #include "components/fs/FS.h" +#include "displayapp/WatchFaces.h" namespace Pinetime { namespace Controllers { @@ -61,15 +62,15 @@ namespace Pinetime { void Init(); void SaveSettings(); - void SetClockFace(uint8_t face) { - if (face != settings.clockFace) { + void SetWatchFace(Pinetime::Applications::WatchFace face) { + if (face != settings.watchFace) { settingsChanged = true; } - settings.clockFace = face; + settings.watchFace = face; }; - uint8_t GetClockFace() const { - return settings.clockFace; + Pinetime::Applications::WatchFace GetWatchFace() const { + return settings.watchFace; }; void SetChimeOption(ChimesOption chimeOption) { @@ -276,7 +277,7 @@ namespace Pinetime { ClockType clockType = ClockType::H24; Notification notificationStatus = Notification::On; - uint8_t clockFace = 0; + Pinetime::Applications::WatchFace watchFace = Pinetime::Applications::WatchFace::Digital; ChimesOption chimesOption = ChimesOption::None; PineTimeStyle PTS; -- cgit v1.2.3-70-g09d2