Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watchface: SlowTime #1906

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion src/components/settings/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ namespace Pinetime {
};
enum class PTSGaugeStyle : uint8_t { Full, Half, Numeric };
enum class PTSWeather : uint8_t { On, Off };
enum class AClockStyle : uint8_t { H24, H12 };
enum class ASecondHand : uint8_t { On, Off };

struct PineTimeStyle {
Colors ColorTime = Colors::Teal;
Expand All @@ -45,6 +47,11 @@ namespace Pinetime {
PTSWeather weatherEnable = PTSWeather::Off;
};

struct Analog {
AClockStyle tfHourEnable = AClockStyle::H12;
ASecondHand secondHandEnable = ASecondHand::On;
};

struct WatchFaceInfineat {
bool showSideCover = true;
int colorIndex = 0;
Expand Down Expand Up @@ -154,6 +161,26 @@ namespace Pinetime {
return settings.PTS.weatherEnable;
};

void SetAClockStyle(AClockStyle tfHourEnable) {
if (tfHourEnable != settings.A.tfHourEnable)
settingsChanged = true;
settings.A.tfHourEnable = tfHourEnable;
};

AClockStyle GetAClockStyle() const {
return settings.A.tfHourEnable;
};

void SetASecondHand(ASecondHand secondHandEnable) {
if (secondHandEnable != settings.A.secondHandEnable)
settingsChanged = true;
settings.A.secondHandEnable = secondHandEnable;
};

ASecondHand GetASecondHand() const {
return settings.A.secondHandEnable;
};

void SetAppMenu(uint8_t menu) {
appMenu = menu;
};
Expand Down Expand Up @@ -301,7 +328,7 @@ namespace Pinetime {
private:
Pinetime::Controllers::FS& fs;

static constexpr uint32_t settingsVersion = 0x0008;
static constexpr uint32_t settingsVersion = 0x0009;

struct SettingsData {
uint32_t version = settingsVersion;
Expand All @@ -318,6 +345,7 @@ namespace Pinetime {
ChimesOption chimesOption = ChimesOption::None;

PineTimeStyle PTS;
Analog A;

WatchFaceInfineat watchFaceInfineat;

Expand Down
Loading