Skip to content

Commit 97deb43

Browse files
committed
Update from JF comments to PR
1 parent 3d6e8c3 commit 97deb43

5 files changed

Lines changed: 6 additions & 33 deletions

File tree

src/components/settings/Settings.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ using namespace Pinetime::Controllers;
66
// TODO (team):
77
// Read and write the settings to Flash
88
//
9-
109
void Settings::Init() {
11-
1210
// default Clock face
1311
clockFace = 0;
1412

src/displayapp/screens/Clock.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ namespace Pinetime {
4949
ScreenList<2> screens;
5050
std::unique_ptr<Screen> WatchFaceDigitalScreen();
5151
std::unique_ptr<Screen> WatchFaceAnalogScreen();
52-
std::unique_ptr<Screen> WatchFaceMinimalScreen();
53-
std::unique_ptr<Screen> WatchFaceCustomScreen();
52+
53+
// Examples for more watch faces
54+
//std::unique_ptr<Screen> WatchFaceMinimalScreen();
55+
//std::unique_ptr<Screen> WatchFaceCustomScreen();
5456

5557
bool running = true;
5658

src/displayapp/screens/ScreenList.h

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,12 @@ namespace Pinetime {
1515
class ScreenList : public Screen {
1616
public:
1717

18-
ScreenList(
19-
DisplayApp* app,
20-
uint8_t initScreen,
21-
std::array<std::function<std::unique_ptr<Screen>()>, N>&& screens,
22-
ScreenListModes mode
23-
)
24-
: Screen(app),
25-
initScreen{initScreen},
26-
screens{std::move(screens)},
27-
mode{mode},
28-
current{this->screens[initScreen]()}
29-
{
18+
ScreenList(DisplayApp* app, uint8_t initScreen, std::array<std::function<std::unique_ptr<Screen>()>, N>&& screens, ScreenListModes mode)
19+
: Screen(app), initScreen{initScreen}, screens{std::move(screens)}, mode{mode}, current{this->screens[initScreen]()} {
3020
screenIndex = initScreen;
3121
}
3222

3323
~ScreenList() override {
34-
current.reset(nullptr);
35-
/*for(uint8_t i = 0; i < screens.size(); i++) {
36-
screens[i]().reset(nullptr);
37-
}*/
3824
lv_obj_clean(lv_scr_act());
3925
}
4026

src/displayapp/screens/WatchFaceAnalog.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,6 @@ WatchFaceAnalog::WatchFaceAnalog(Pinetime::Applications::DisplayApp *app,
103103

104104
UpdateClock();
105105

106-
/*lv_obj_t* backgroundLabel = lv_label_create(lv_scr_act(), nullptr);
107-
lv_label_set_long_mode(backgroundLabel, LV_LABEL_LONG_CROP);
108-
lv_obj_set_size(backgroundLabel, 240, 240);
109-
lv_obj_set_pos(backgroundLabel, 0, 0);
110-
lv_label_set_text_static(backgroundLabel, "");*/
111-
112106
}
113107

114108
WatchFaceAnalog::~WatchFaceAnalog() {

src/displayapp/screens/WatchFaceDigital.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ WatchFaceDigital::WatchFaceDigital(DisplayApp* app,
3030
heartRateController{heartRateController} {
3131
settingsController.SetClockFace(0);
3232

33-
// init
34-
/*currentDateTime = dateTimeController.CurrentDateTime();
35-
batteryPercentRemaining = batteryController.PercentRemaining();
36-
bleState = bleController.IsConnected();
37-
notificationState = notificatioManager.AreNewNotificationsAvailable();
38-
heartbeat = heartRateController.HeartRate();*/
39-
4033
displayedChar[0] = 0;
4134
displayedChar[1] = 0;
4235
displayedChar[2] = 0;

0 commit comments

Comments
 (0)