summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoaquim <joaquim.org@gmail.com>2021-03-06 19:55:53 +0000
committerJoaquim <joaquim.org@gmail.com>2021-03-06 19:55:53 +0000
commit97deb43fb78b581535887938a0c3c0813896fcbe (patch)
tree8e393258059f434a8a140f6aff303e4228f5adc5 /src
parent3d6e8c3bebbdaafa764b06ebc2769f2eaac05298 (diff)
Update from JF comments to PR
Diffstat (limited to 'src')
-rw-r--r--src/components/settings/Settings.cpp2
-rw-r--r--src/displayapp/screens/Clock.h6
-rw-r--r--src/displayapp/screens/ScreenList.h18
-rw-r--r--src/displayapp/screens/WatchFaceAnalog.cpp6
-rw-r--r--src/displayapp/screens/WatchFaceDigital.cpp7
5 files changed, 6 insertions, 33 deletions
diff --git a/src/components/settings/Settings.cpp b/src/components/settings/Settings.cpp
index 87cfe885..0c6cf610 100644
--- a/src/components/settings/Settings.cpp
+++ b/src/components/settings/Settings.cpp
@@ -6,9 +6,7 @@ using namespace Pinetime::Controllers;
// TODO (team):
// Read and write the settings to Flash
//
-
void Settings::Init() {
-
// default Clock face
clockFace = 0;
diff --git a/src/displayapp/screens/Clock.h b/src/displayapp/screens/Clock.h
index 2b1be4ac..964ccbf6 100644
--- a/src/displayapp/screens/Clock.h
+++ b/src/displayapp/screens/Clock.h
@@ -49,8 +49,10 @@ namespace Pinetime {
ScreenList<2> screens;
std::unique_ptr<Screen> WatchFaceDigitalScreen();
std::unique_ptr<Screen> WatchFaceAnalogScreen();
- std::unique_ptr<Screen> WatchFaceMinimalScreen();
- std::unique_ptr<Screen> WatchFaceCustomScreen();
+
+ // Examples for more watch faces
+ //std::unique_ptr<Screen> WatchFaceMinimalScreen();
+ //std::unique_ptr<Screen> WatchFaceCustomScreen();
bool running = true;
diff --git a/src/displayapp/screens/ScreenList.h b/src/displayapp/screens/ScreenList.h
index 56d9abe0..43b33f40 100644
--- a/src/displayapp/screens/ScreenList.h
+++ b/src/displayapp/screens/ScreenList.h
@@ -15,26 +15,12 @@ namespace Pinetime {
class ScreenList : public Screen {
public:
- ScreenList(
- DisplayApp* app,
- uint8_t initScreen,
- std::array<std::function<std::unique_ptr<Screen>()>, N>&& screens,
- ScreenListModes mode
- )
- : Screen(app),
- initScreen{initScreen},
- screens{std::move(screens)},
- mode{mode},
- current{this->screens[initScreen]()}
- {
+ ScreenList(DisplayApp* app, uint8_t initScreen, std::array<std::function<std::unique_ptr<Screen>()>, N>&& screens, ScreenListModes mode)
+ : Screen(app), initScreen{initScreen}, screens{std::move(screens)}, mode{mode}, current{this->screens[initScreen]()} {
screenIndex = initScreen;
}
~ScreenList() override {
- current.reset(nullptr);
- /*for(uint8_t i = 0; i < screens.size(); i++) {
- screens[i]().reset(nullptr);
- }*/
lv_obj_clean(lv_scr_act());
}
diff --git a/src/displayapp/screens/WatchFaceAnalog.cpp b/src/displayapp/screens/WatchFaceAnalog.cpp
index efca10c2..b51d48c7 100644
--- a/src/displayapp/screens/WatchFaceAnalog.cpp
+++ b/src/displayapp/screens/WatchFaceAnalog.cpp
@@ -103,12 +103,6 @@ WatchFaceAnalog::WatchFaceAnalog(Pinetime::Applications::DisplayApp *app,
UpdateClock();
- /*lv_obj_t* backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
- lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
- lv_obj_set_size(backgroundLabel, 240, 240);
- lv_obj_set_pos(backgroundLabel, 0, 0);
- lv_label_set_text_static(backgroundLabel, "");*/
-
}
WatchFaceAnalog::~WatchFaceAnalog() {
diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp
index 99df318a..4560ccdb 100644
--- a/src/displayapp/screens/WatchFaceDigital.cpp
+++ b/src/displayapp/screens/WatchFaceDigital.cpp
@@ -30,13 +30,6 @@ WatchFaceDigital::WatchFaceDigital(DisplayApp* app,
heartRateController{heartRateController} {
settingsController.SetClockFace(0);
- // init
- /*currentDateTime = dateTimeController.CurrentDateTime();
- batteryPercentRemaining = batteryController.PercentRemaining();
- bleState = bleController.IsConnected();
- notificationState = notificatioManager.AreNewNotificationsAvailable();
- heartbeat = heartRateController.HeartRate();*/
-
displayedChar[0] = 0;
displayedChar[1] = 0;
displayedChar[2] = 0;