From 104e750a75723eb4b808e852b9ce32c4dad6f777 Mon Sep 17 00:00:00 2001 From: zyphlar Date: Thu, 4 Jan 2024 23:58:51 -0800 Subject: [PATCH] Revert "remove PTS, Terminal and Infineat faces" This reverts commit 3ade3153e5a1813343752119924bd2902115f05c. --- src/displayapp/WatchFaces.h | 7 +++- src/displayapp/screens/Clock.cpp | 42 +++++++++++++++++++ .../screens/settings/SettingWatchFace.h | 3 ++ 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/src/displayapp/WatchFaces.h b/src/displayapp/WatchFaces.h index 97219458..46573534 100644 --- a/src/displayapp/WatchFaces.h +++ b/src/displayapp/WatchFaces.h @@ -5,8 +5,11 @@ namespace Pinetime { enum class WatchFace : uint8_t { Digital = 0, Analog = 1, - CasioStyleG7710 = 2, - Fuzzy = 3, + PineTimeStyle = 2, + Terminal = 3, + Infineat = 4, + CasioStyleG7710 = 5, + Fuzzy = 6, }; } } diff --git a/src/displayapp/screens/Clock.cpp b/src/displayapp/screens/Clock.cpp index b9f4244f..42673b7f 100644 --- a/src/displayapp/screens/Clock.cpp +++ b/src/displayapp/screens/Clock.cpp @@ -8,8 +8,11 @@ #include "components/settings/Settings.h" #include "displayapp/DisplayApp.h" #include "displayapp/screens/WatchFaceDigital.h" +#include "displayapp/screens/WatchFaceTerminal.h" +#include "displayapp/screens/WatchFaceInfineat.h" #include "displayapp/screens/WatchFaceAnalog.h" #include "displayapp/screens/WatchFaceFuzzy.h" +#include "displayapp/screens/WatchFacePineTimeStyle.h" #include "displayapp/screens/WatchFaceCasioStyleG7710.h" using namespace Pinetime::Applications::Screens; @@ -41,6 +44,15 @@ Clock::Clock(Controllers::DateTime& dateTimeController, case WatchFace::Analog: return WatchFaceAnalogScreen(); break; + case WatchFace::PineTimeStyle: + return WatchFacePineTimeStyleScreen(); + break; + case WatchFace::Terminal: + return WatchFaceTerminalScreen(); + break; + case WatchFace::Infineat: + return WatchFaceInfineatScreen(); + break; case WatchFace::CasioStyleG7710: return WatchFaceCasioStyleG7710(); break; @@ -83,6 +95,36 @@ std::unique_ptr Clock::WatchFaceAnalogScreen() { settingsController); } +std::unique_ptr Clock::WatchFacePineTimeStyleScreen() { + return std::make_unique(dateTimeController, + batteryController, + bleController, + notificationManager, + settingsController, + motionController, + weatherService); +} + +std::unique_ptr Clock::WatchFaceTerminalScreen() { + return std::make_unique(dateTimeController, + batteryController, + bleController, + notificationManager, + settingsController, + heartRateController, + motionController); +} + +std::unique_ptr Clock::WatchFaceInfineatScreen() { + return std::make_unique(dateTimeController, + batteryController, + bleController, + notificationManager, + settingsController, + motionController, + filesystem); +} + std::unique_ptr Clock::WatchFaceCasioStyleG7710() { return std::make_unique(dateTimeController, batteryController, diff --git a/src/displayapp/screens/settings/SettingWatchFace.h b/src/displayapp/screens/settings/SettingWatchFace.h index 2dd543e6..27bc8abb 100644 --- a/src/displayapp/screens/settings/SettingWatchFace.h +++ b/src/displayapp/screens/settings/SettingWatchFace.h @@ -43,6 +43,9 @@ namespace Pinetime { std::array watchfaces { {{"Digital face", true}, {"Analog face", true}, + {"PineTimeStyle", true}, + {"Terminal", true}, + {"Infineat face", Applications::Screens::WatchFaceInfineat::IsAvailable(filesystem)}, {"Casio G7710", Applications::Screens::WatchFaceCasioStyleG7710::IsAvailable(filesystem)}, {"Fuzzy Clock", true}, {"", false}}};