1
0
Fork 0

Update from JF comments to PR

This commit is contained in:
Joaquim 2021-03-06 19:55:53 +00:00
parent 3d6e8c3beb
commit 97deb43fb7
5 changed files with 6 additions and 33 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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());
}

View file

@ -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() {

View file

@ -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;