Skip to content
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
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ list(APPEND SOURCE_FILES
displayapp/screens/Motion.cpp
displayapp/screens/FlashLight.cpp
displayapp/screens/List.cpp
displayapp/screens/CheckboxList.cpp
displayapp/screens/Container.cpp
displayapp/screens/BatteryInfo.cpp
displayapp/screens/Steps.cpp
displayapp/screens/Timer.cpp
Expand Down Expand Up @@ -429,6 +429,7 @@ list(APPEND SOURCE_FILES
displayapp/screens/WatchFaceDigital.cpp
displayapp/screens/WatchFaceInfineat.cpp
displayapp/screens/WatchFaceTerminal.cpp
displayapp/screens/WatchFaceFuzzy.cpp
displayapp/screens/WatchFacePineTimeStyle.cpp

##
Expand Down
1 change: 1 addition & 0 deletions src/displayapp/Apps.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace Pinetime {
None,
Launcher,
Clock,
WatchFaceDigitalPreview,
SysInfo,
FirmwareUpdate,
FirmwareValidation,
Expand Down
15 changes: 14 additions & 1 deletion src/displayapp/DisplayApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "components/motor/MotorController.h"
#include "displayapp/screens/ApplicationList.h"
#include "displayapp/screens/Clock.h"
#include "displayapp/screens/WatchFaceDigital.h"
#include "displayapp/screens/FirmwareUpdate.h"
#include "displayapp/screens/FirmwareValidation.h"
#include "displayapp/screens/InfiniPaint.h"
Expand Down Expand Up @@ -327,9 +328,21 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
settingsController,
heartRateController,
motionController,
motorController,
filesystem);
break;

case Apps::WatchFaceDigitalPreview:
currentScreen = std::make_unique<Screens::WatchFaceDigital>(this,
dateTimeController,
batteryController,
bleController,
notificationManager,
settingsController,
heartRateController,
motionController,
Screens::Screen::Modes::Preview);
ReturnApp(Apps::Clock, FullRefreshDirections::Left, TouchEvents::None);
break;
case Apps::Error:
currentScreen = std::make_unique<Screens::Error>(this, bootError);
ReturnApp(Apps::Clock, FullRefreshDirections::Down, TouchEvents::None);
Expand Down
4 changes: 1 addition & 3 deletions src/displayapp/fonts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
using [this site](http://www.ltg.ed.ac.uk/~richard/utf-8.cgi?input=f185&mode=hex)
- Define the new symbols in `src/displayapp/screens/Symbols.h`:

```
static constexpr const char* newSymbol = "\xEF\x86\x85";
```
Fill the font converter fields as follows:

### the config file format:

Expand Down
2 changes: 1 addition & 1 deletion src/displayapp/fonts/fonts.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"sources": [
{
"file": "JetBrainsMono-Regular.ttf",
"range": "0x25, 0x2b, 0x2d, 0x30-0x3a"
"range": "0x20, 0x25, 0x27, 0x2b, 0x2d, 0x30-0x3a, 0x61-0x7a"
}
],
"bpp": 1,
Expand Down
117 changes: 0 additions & 117 deletions src/displayapp/screens/CheckboxList.cpp

This file was deleted.

48 changes: 0 additions & 48 deletions src/displayapp/screens/CheckboxList.h

This file was deleted.

17 changes: 16 additions & 1 deletion src/displayapp/screens/Clock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <lvgl/lvgl.h>
#include "components/battery/BatteryController.h"
#include "components/motion/MotionController.h"
#include "components/motor/MotorController.h"
#include "components/ble/BleController.h"
#include "components/ble/NotificationManager.h"
#include "components/settings/Settings.h"
Expand All @@ -13,6 +14,7 @@
#include "displayapp/screens/WatchFaceInfineat.h"
#include "displayapp/screens/WatchFaceAnalog.h"
#include "displayapp/screens/WatchFacePineTimeStyle.h"
#include "displayapp/screens/WatchFaceFuzzy.h"

using namespace Pinetime::Applications::Screens;

Expand All @@ -24,6 +26,7 @@ Clock::Clock(DisplayApp* app,
Controllers::Settings& settingsController,
Controllers::HeartRateController& heartRateController,
Controllers::MotionController& motionController,
Controllers::MotorController& motorController,
Controllers::FS& filesystem)
: Screen(app),
dateTimeController {dateTimeController},
Expand All @@ -33,6 +36,7 @@ Clock::Clock(DisplayApp* app,
settingsController {settingsController},
heartRateController {heartRateController},
motionController {motionController},
motorController {motorController},
filesystem {filesystem},
screen {[this, &settingsController]() {
switch (settingsController.GetClockFace()) {
Expand All @@ -51,6 +55,9 @@ Clock::Clock(DisplayApp* app,
case 4:
return WatchFaceInfineatScreen();
break;
case 5:
return WatchFaceFuzzyScreen();
break;
}
return WatchFaceDigitalScreen();
}()} {
Expand Down Expand Up @@ -115,8 +122,16 @@ std::unique_ptr<Screen> Clock::WatchFaceInfineatScreen() {
dateTimeController,
batteryController,
bleController,
notificatioManager,
notificationManager,
settingsController,
motionController,
filesystem);
}

std::unique_ptr<Screen> Clock::WatchFaceFuzzyScreen() {
return std::make_unique<Screens::WatchFaceFuzzy>(app,
dateTimeController,
settingsController,
motorController,
motionController);
}
4 changes: 4 additions & 0 deletions src/displayapp/screens/Clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ namespace Pinetime {
class Ble;
class NotificationManager;
class MotionController;
class MotorController;
}

namespace Applications {
Expand All @@ -29,6 +30,7 @@ namespace Pinetime {
Controllers::Settings& settingsController,
Controllers::HeartRateController& heartRateController,
Controllers::MotionController& motionController,
Controllers::MotorController& motorController,
Controllers::FS& filesystem);
~Clock() override;

Expand All @@ -43,6 +45,7 @@ namespace Pinetime {
Controllers::Settings& settingsController;
Controllers::HeartRateController& heartRateController;
Controllers::MotionController& motionController;
Controllers::MotorController& motorController;
Controllers::FS& filesystem;

std::unique_ptr<Screen> screen;
Expand All @@ -51,6 +54,7 @@ namespace Pinetime {
std::unique_ptr<Screen> WatchFacePineTimeStyleScreen();
std::unique_ptr<Screen> WatchFaceTerminalScreen();
std::unique_ptr<Screen> WatchFaceInfineatScreen();
std::unique_ptr<Screen> WatchFaceFuzzyScreen();
};
}
}
Expand Down
17 changes: 17 additions & 0 deletions src/displayapp/screens/Container.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include "displayapp/screens/Container.h"

using namespace Pinetime::Applications::Screens;

Container::Container(
DisplayApp* app,
lv_obj_t* container,
uint8_t screenIdx,
uint8_t nScreens,
bool horizontal)
: Screen(app), container {container}, pageIndicator {screenIdx, nScreens, horizontal} {
pageIndicator.Create();
}

Container::~Container() {
lv_obj_clean(lv_scr_act());
}
22 changes: 22 additions & 0 deletions src/displayapp/screens/Container.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma once

#include <lvgl/lvgl.h>
#include "displayapp/screens/Screen.h"
#include "displayapp/widgets/PageIndicator.h"

namespace Pinetime {
namespace Applications {
namespace Screens {

class Container : public Screen {
public:
Container(DisplayApp* app, lv_obj_t* container, uint8_t screenIdx, uint8_t nScreens, bool horizontal = false);
~Container() override;

private:
lv_obj_t* container;
Widgets::PageIndicator pageIndicator;
};
}
}
}
1 change: 0 additions & 1 deletion src/displayapp/screens/Notifications.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ namespace Pinetime {

class Notifications : public Screen {
public:
enum class Modes { Normal, Preview };
explicit Notifications(DisplayApp* app,
Pinetime::Controllers::NotificationManager& notificationManager,
Pinetime::Controllers::AlertNotificationService& alertNotificationService,
Expand Down
Loading