Refactor watch face to enum (#1339)

change watch face from int to enum

---------

Co-authored-by: minacode <minamoto9@web.de>
This commit is contained in:
Max Friedrich
2023-04-30 17:03:46 +02:00
committed by GitHub
parent 5f19f689f9
commit 020a7fd11d
5 changed files with 34 additions and 16 deletions

View File

@@ -3,6 +3,7 @@
#include <bitset>
#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;