Merge remote-tracking branch 'upstream/develop' into pts-settings
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "Colors.h"
|
||||
#include "displayapp/Colors.h"
|
||||
|
||||
using namespace Pinetime::Applications;
|
||||
using namespace Pinetime::Controllers;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <lvgl/src/lv_misc/lv_color.h>
|
||||
#include <components/settings/Settings.h>
|
||||
#include "components/settings/Settings.h"
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Applications {
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#include "DisplayApp.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include <libraries/log/nrf_log.h>
|
||||
#include <displayapp/screens/HeartRate.h>
|
||||
#include <displayapp/screens/Motion.h>
|
||||
#include <displayapp/screens/Timer.h>
|
||||
#include <displayapp/screens/Alarm.h>
|
||||
#include "displayapp/screens/HeartRate.h"
|
||||
#include "displayapp/screens/Motion.h"
|
||||
#include "displayapp/screens/Timer.h"
|
||||
#include "displayapp/screens/Alarm.h"
|
||||
#include "components/battery/BatteryController.h"
|
||||
#include "components/ble/BleController.h"
|
||||
#include "components/datetime/DateTimeController.h"
|
||||
@@ -261,7 +261,13 @@ void DisplayApp::Refresh() {
|
||||
break;
|
||||
case Messages::ButtonLongPressed:
|
||||
if (currentApp != Apps::Clock) {
|
||||
LoadApp(Apps::Clock, DisplayApp::FullRefreshDirections::Down);
|
||||
if (currentApp == Apps::Notifications) {
|
||||
LoadApp(Apps::Clock, DisplayApp::FullRefreshDirections::Up);
|
||||
} else if (currentApp == Apps::QuickSettings) {
|
||||
LoadApp(Apps::Clock, DisplayApp::FullRefreshDirections::LeftAnim);
|
||||
} else {
|
||||
LoadApp(Apps::Clock, DisplayApp::FullRefreshDirections::Down);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Messages::ButtonLongerPressed:
|
||||
@@ -419,7 +425,7 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
|
||||
currentScreen = std::make_unique<Screens::Twos>(this);
|
||||
break;
|
||||
case Apps::Paint:
|
||||
currentScreen = std::make_unique<Screens::InfiniPaint>(this, lvgl);
|
||||
currentScreen = std::make_unique<Screens::InfiniPaint>(this, lvgl, motorController);
|
||||
break;
|
||||
case Apps::Paddle:
|
||||
currentScreen = std::make_unique<Screens::Paddle>(this, lvgl);
|
||||
|
@@ -5,9 +5,9 @@
|
||||
#include <task.h>
|
||||
#include <memory>
|
||||
#include <systemtask/Messages.h>
|
||||
#include "Apps.h"
|
||||
#include "LittleVgl.h"
|
||||
#include "TouchEvents.h"
|
||||
#include "displayapp/Apps.h"
|
||||
#include "displayapp/LittleVgl.h"
|
||||
#include "displayapp/TouchEvents.h"
|
||||
#include "components/brightness/BrightnessController.h"
|
||||
#include "components/motor/MotorController.h"
|
||||
#include "components/firmwarevalidator/FirmwareValidator.h"
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "components/alarm/AlarmController.h"
|
||||
#include "touchhandler/TouchHandler.h"
|
||||
|
||||
#include "Messages.h"
|
||||
#include "displayapp/Messages.h"
|
||||
#include "BootErrors.h"
|
||||
|
||||
namespace Pinetime {
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#include "DisplayAppRecovery.h"
|
||||
#include "displayapp/DisplayAppRecovery.h"
|
||||
#include <FreeRTOS.h>
|
||||
#include <task.h>
|
||||
#include <libraries/log/nrf_log.h>
|
||||
#include <components/rle/RleDecoder.h>
|
||||
#include <touchhandler/TouchHandler.h>
|
||||
#include "components/rle/RleDecoder.h"
|
||||
#include "touchhandler/TouchHandler.h"
|
||||
#include "displayapp/icons/infinitime/infinitime-nb.c"
|
||||
#include "components/ble/BleController.h"
|
||||
|
||||
|
@@ -11,10 +11,10 @@
|
||||
#include <drivers/Watchdog.h>
|
||||
#include <components/motor/MotorController.h>
|
||||
#include "BootErrors.h"
|
||||
#include "TouchEvents.h"
|
||||
#include "Apps.h"
|
||||
#include "Messages.h"
|
||||
#include "DummyLittleVgl.h"
|
||||
#include "displayapp/TouchEvents.h"
|
||||
#include "displayapp/Apps.h"
|
||||
#include "displayapp/Messages.h"
|
||||
#include "displayapp/DummyLittleVgl.h"
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Drivers {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <libs/lvgl/src/lv_core/lv_style.h>
|
||||
#include <libs/lvgl/src/lv_themes/lv_theme.h>
|
||||
#include <libs/lvgl/src/lv_hal/lv_hal.h>
|
||||
#include <lvgl/src/lv_core/lv_style.h>
|
||||
#include <lvgl/src/lv_themes/lv_theme.h>
|
||||
#include <lvgl/src/lv_hal/lv_hal.h>
|
||||
#include <drivers/St7789.h>
|
||||
#include <drivers/Cst816s.h>
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "LittleVgl.h"
|
||||
#include "lv_pinetime_theme.h"
|
||||
#include "displayapp/LittleVgl.h"
|
||||
#include "displayapp/lv_pinetime_theme.h"
|
||||
|
||||
#include <FreeRTOS.h>
|
||||
#include <task.h>
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
namespace Pinetime {
|
||||
namespace Applications {
|
||||
namespace Display {
|
||||
|
@@ -6,7 +6,7 @@
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "lv_pinetime_theme.h"
|
||||
#include "displayapp/lv_pinetime_theme.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
|
@@ -15,9 +15,9 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "Alarm.h"
|
||||
#include "Screen.h"
|
||||
#include "Symbols.h"
|
||||
#include "displayapp/screens/Alarm.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
using Pinetime::Controllers::AlarmController;
|
||||
|
@@ -17,9 +17,9 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "systemtask/SystemTask.h"
|
||||
#include "../LittleVgl.h"
|
||||
#include "displayapp/LittleVgl.h"
|
||||
#include "components/alarm/AlarmController.h"
|
||||
|
||||
namespace Pinetime {
|
||||
|
@@ -1,10 +1,10 @@
|
||||
#include "ApplicationList.h"
|
||||
#include "displayapp/screens/ApplicationList.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <array>
|
||||
#include "Symbols.h"
|
||||
#include "Tile.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
#include "displayapp/screens/Tile.h"
|
||||
#include "displayapp/Apps.h"
|
||||
#include "../DisplayApp.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -2,8 +2,8 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "Screen.h"
|
||||
#include "ScreenList.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "displayapp/screens/ScreenList.h"
|
||||
#include "components/datetime/DateTimeController.h"
|
||||
#include "components/settings/Settings.h"
|
||||
#include "components/battery/BatteryController.h"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "displayapp/screens/BatteryIcon.h"
|
||||
#include <cstdint>
|
||||
#include "BatteryIcon.h"
|
||||
#include "Symbols.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Applications {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "BatteryInfo.h"
|
||||
#include "../DisplayApp.h"
|
||||
#include "displayapp/screens/BatteryInfo.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "components/battery/BatteryController.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <FreeRTOS.h>
|
||||
#include <timers.h>
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
namespace Pinetime {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "BleIcon.h"
|
||||
#include "Symbols.h"
|
||||
#include "displayapp/screens/BleIcon.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
const char* BleIcon::GetIcon(bool isConnected) {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "Brightness.h"
|
||||
#include "displayapp/screens/Brightness.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <lvgl/src/lv_core/lv_obj.h>
|
||||
#include <cstdint>
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "components/brightness/BrightnessController.h"
|
||||
|
||||
namespace Pinetime {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "Clock.h"
|
||||
#include "displayapp/screens/Clock.h"
|
||||
|
||||
#include <date/date.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
@@ -6,10 +6,11 @@
|
||||
#include "components/motion/MotionController.h"
|
||||
#include "components/ble/BleController.h"
|
||||
#include "components/ble/NotificationManager.h"
|
||||
#include "../DisplayApp.h"
|
||||
#include "WatchFaceDigital.h"
|
||||
#include "WatchFaceAnalog.h"
|
||||
#include "PineTimeStyle.h"
|
||||
#include "components/settings/Settings.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/screens/WatchFaceDigital.h"
|
||||
#include "displayapp/screens/WatchFaceAnalog.h"
|
||||
#include "displayapp/screens/PineTimeStyle.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <components/heartrate/HeartRateController.h>
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "components/datetime/DateTimeController.h"
|
||||
|
||||
namespace Pinetime {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "DropDownDemo.h"
|
||||
#include "displayapp/screens/DropDownDemo.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <libraries/log/nrf_log.h>
|
||||
#include "../DisplayApp.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include <lvgl/src/lv_core/lv_obj.h>
|
||||
|
||||
namespace Pinetime {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "Error.h"
|
||||
#include "displayapp/screens/Error.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "BootErrors.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "FirmwareUpdate.h"
|
||||
#include "displayapp/screens/FirmwareUpdate.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "components/ble/BleController.h"
|
||||
#include "../DisplayApp.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include <lvgl/src/lv_core/lv_obj.h>
|
||||
#include "FreeRTOS.h"
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include "FirmwareValidation.h"
|
||||
#include "displayapp/screens/FirmwareValidation.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "Version.h"
|
||||
#include "components/firmwarevalidator/FirmwareValidator.h"
|
||||
#include "../DisplayApp.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include <lvgl/src/lv_core/lv_obj.h>
|
||||
|
||||
namespace Pinetime {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "FlashLight.h"
|
||||
#include "../DisplayApp.h"
|
||||
#include "Symbols.h"
|
||||
#include "displayapp/screens/FlashLight.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "components/brightness/BrightnessController.h"
|
||||
#include "systemtask/SystemTask.h"
|
||||
#include <cstdint>
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include <libs/lvgl/lvgl.h>
|
||||
#include "HeartRate.h"
|
||||
#include "displayapp/screens/HeartRate.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <components/heartrate/HeartRateController.h>
|
||||
|
||||
#include "../DisplayApp.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -2,11 +2,11 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include <bits/unique_ptr.h>
|
||||
#include "systemtask/SystemTask.h"
|
||||
#include <libs/lvgl/src/lv_core/lv_style.h>
|
||||
#include <libs/lvgl/src/lv_core/lv_obj.h>
|
||||
#include <lvgl/src/lv_core/lv_style.h>
|
||||
#include <lvgl/src/lv_core/lv_obj.h>
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Controllers {
|
||||
|
@@ -1,10 +1,13 @@
|
||||
#include "InfiniPaint.h"
|
||||
#include "../DisplayApp.h"
|
||||
#include "../LittleVgl.h"
|
||||
#include "displayapp/screens/InfiniPaint.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/LittleVgl.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
InfiniPaint::InfiniPaint(Pinetime::Applications::DisplayApp* app, Pinetime::Components::LittleVgl& lvgl) : Screen(app), lvgl {lvgl} {
|
||||
InfiniPaint::InfiniPaint(Pinetime::Applications::DisplayApp* app,
|
||||
Pinetime::Components::LittleVgl& lvgl,
|
||||
Pinetime::Controllers::MotorController& motor)
|
||||
: Screen(app), lvgl {lvgl}, motor {motor} {
|
||||
std::fill(b, b + bufferSize, selectColor);
|
||||
}
|
||||
|
||||
@@ -15,6 +18,7 @@ InfiniPaint::~InfiniPaint() {
|
||||
bool InfiniPaint::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
|
||||
switch (event) {
|
||||
case Pinetime::Applications::TouchEvents::LongTap:
|
||||
color = (color + 1) % 8;
|
||||
switch (color) {
|
||||
case 0:
|
||||
selectColor = LV_COLOR_MAGENTA;
|
||||
@@ -47,7 +51,7 @@ bool InfiniPaint::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
|
||||
}
|
||||
|
||||
std::fill(b, b + bufferSize, selectColor);
|
||||
color++;
|
||||
motor.RunForDuration(35);
|
||||
return true;
|
||||
default:
|
||||
return true;
|
||||
|
@@ -2,7 +2,9 @@
|
||||
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <cstdint>
|
||||
#include "Screen.h"
|
||||
#include <algorithm> // std::fill
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "components/motor/MotorController.h"
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Components {
|
||||
@@ -13,7 +15,7 @@ namespace Pinetime {
|
||||
|
||||
class InfiniPaint : public Screen {
|
||||
public:
|
||||
InfiniPaint(DisplayApp* app, Pinetime::Components::LittleVgl& lvgl);
|
||||
InfiniPaint(DisplayApp* app, Pinetime::Components::LittleVgl& lvgl, Controllers::MotorController& motor);
|
||||
|
||||
~InfiniPaint() override;
|
||||
|
||||
@@ -23,6 +25,7 @@ namespace Pinetime {
|
||||
|
||||
private:
|
||||
Pinetime::Components::LittleVgl& lvgl;
|
||||
Controllers::MotorController& motor;
|
||||
static constexpr uint16_t width = 10;
|
||||
static constexpr uint16_t height = 10;
|
||||
static constexpr uint16_t bufferSize = width * height;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "Label.h"
|
||||
#include "displayapp/screens/Label.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
namespace Pinetime {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "List.h"
|
||||
#include "../DisplayApp.h"
|
||||
#include "Symbols.h"
|
||||
#include "displayapp/screens/List.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include "Screen.h"
|
||||
#include "../Apps.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "displayapp/Apps.h"
|
||||
#include "components/settings/Settings.h"
|
||||
|
||||
#define MAXLISTITEMS 4
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "Meter.h"
|
||||
#include "displayapp/screens/Meter.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "../DisplayApp.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include <lvgl/src/lv_core/lv_style.h>
|
||||
#include <lvgl/src/lv_core/lv_obj.h>
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "Metronome.h"
|
||||
#include "Symbols.h"
|
||||
#include "displayapp/screens/Metronome.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "systemtask/SystemTask.h"
|
||||
#include "components/motor/MotorController.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Applications {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include <libs/lvgl/lvgl.h>
|
||||
#include "Motion.h"
|
||||
#include "../DisplayApp.h"
|
||||
#include "displayapp/screens/Motion.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "displayapp/DisplayApp.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -2,10 +2,10 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include <bits/unique_ptr.h>
|
||||
#include <libs/lvgl/src/lv_core/lv_style.h>
|
||||
#include <libs/lvgl/src/lv_core/lv_obj.h>
|
||||
#include <lvgl/src/lv_core/lv_style.h>
|
||||
#include <lvgl/src/lv_core/lv_obj.h>
|
||||
#include <components/motion/MotionController.h>
|
||||
|
||||
namespace Pinetime {
|
||||
|
@@ -15,10 +15,10 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "Music.h"
|
||||
#include "Symbols.h"
|
||||
#include "displayapp/screens/Music.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
#include <cstdint>
|
||||
#include "../DisplayApp.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "components/ble/MusicService.h"
|
||||
#include "displayapp/icons/music/disc.cpp"
|
||||
#include "displayapp/icons/music/disc_f_1.cpp"
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#include <FreeRTOS.h>
|
||||
#include <lvgl/src/lv_core/lv_obj.h>
|
||||
#include <string>
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Controllers {
|
||||
|
@@ -15,9 +15,9 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "Navigation.h"
|
||||
#include "displayapp/screens/Navigation.h"
|
||||
#include <cstdint>
|
||||
#include "../DisplayApp.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "components/ble/NavigationService.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#include <FreeRTOS.h>
|
||||
#include <lvgl/src/lv_core/lv_obj.h>
|
||||
#include <string>
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include <array>
|
||||
|
||||
namespace Pinetime {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "NotificationIcon.h"
|
||||
#include "Symbols.h"
|
||||
#include "displayapp/screens/NotificationIcon.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
const char* NotificationIcon::GetIcon(bool newNotificationAvailable) {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include "Notifications.h"
|
||||
#include <displayapp/DisplayApp.h>
|
||||
#include "displayapp/screens/Notifications.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "components/ble/MusicService.h"
|
||||
#include "components/ble/AlertNotificationService.h"
|
||||
#include "Symbols.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
extern lv_font_t jetbrains_mono_extrabold_compressed;
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "components/ble/NotificationManager.h"
|
||||
#include "components/motor/MotorController.h"
|
||||
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#include "Paddle.h"
|
||||
#include "../DisplayApp.h"
|
||||
#include "../LittleVgl.h"
|
||||
#include "displayapp/screens/Paddle.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/LittleVgl.h"
|
||||
|
||||
#include <cstdlib> // for rand()
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
@@ -50,6 +52,13 @@ void Paddle::Refresh() {
|
||||
// checks if it has touched the side (right side)
|
||||
if (ballX >= LV_HOR_RES - ballSize - 1) {
|
||||
dx *= -1;
|
||||
dy += rand() % 3 - 1; // add a little randomization in wall bounce direction, one of [-1, 0, 1]
|
||||
if (dy > 5) { // limit dy to be in range [-5 to 5]
|
||||
dy = 5;
|
||||
}
|
||||
if (dy < -5) {
|
||||
dy = -5;
|
||||
}
|
||||
}
|
||||
|
||||
// checks if it is in the position of the paddle
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <cstdint>
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Components {
|
||||
|
@@ -19,21 +19,21 @@
|
||||
* Style/layout copied from TimeStyle for Pebble by Dan Tilden (github.com/tilden)
|
||||
*/
|
||||
|
||||
#include "PineTimeStyle.h"
|
||||
#include "displayapp/screens/PineTimeStyle.h"
|
||||
#include <date/date.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <cstdio>
|
||||
#include <displayapp/Colors.h>
|
||||
#include "BatteryIcon.h"
|
||||
#include "BleIcon.h"
|
||||
#include "NotificationIcon.h"
|
||||
#include "Symbols.h"
|
||||
#include "displayapp/screens/BatteryIcon.h"
|
||||
#include "displayapp/screens/BleIcon.h"
|
||||
#include "displayapp/screens/NotificationIcon.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
#include "components/battery/BatteryController.h"
|
||||
#include "components/ble/BleController.h"
|
||||
#include "components/ble/NotificationManager.h"
|
||||
#include "components/motion/MotionController.h"
|
||||
#include "components/settings/Settings.h"
|
||||
#include "../DisplayApp.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -4,8 +4,7 @@
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include "Screen.h"
|
||||
#include "ScreenList.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "components/datetime/DateTimeController.h"
|
||||
|
||||
namespace Pinetime {
|
||||
@@ -15,6 +14,7 @@ namespace Pinetime {
|
||||
class Ble;
|
||||
class NotificationManager;
|
||||
class HeartRateController;
|
||||
class MotionController;
|
||||
}
|
||||
|
||||
namespace Applications {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
void Screen::RefreshTaskCallback(lv_task_t* task) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include "../TouchEvents.h"
|
||||
#include "displayapp/TouchEvents.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
namespace Pinetime {
|
||||
|
@@ -3,8 +3,8 @@
|
||||
#include <array>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include "Screen.h"
|
||||
#include "../DisplayApp.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Applications {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "Steps.h"
|
||||
#include "displayapp/screens/Steps.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "../DisplayApp.h"
|
||||
#include "Symbols.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include <components/motion/MotionController.h>
|
||||
|
||||
namespace Pinetime {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include "StopWatch.h"
|
||||
|
||||
#include "Screen.h"
|
||||
#include "Symbols.h"
|
||||
#include "lvgl/lvgl.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "projdefs.h"
|
||||
#include "FreeRTOSConfig.h"
|
||||
#include "task.h"
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "components/datetime/DateTimeController.h"
|
||||
#include "../LittleVgl.h"
|
||||
#include "displayapp/LittleVgl.h"
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "portmacro_cmsis.h"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "SystemInfo.h"
|
||||
#include "displayapp/screens/SystemInfo.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "../DisplayApp.h"
|
||||
#include "Label.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/screens/Label.h"
|
||||
#include "Version.h"
|
||||
#include "BootloaderVersion.h"
|
||||
#include "components/battery/BatteryController.h"
|
||||
@@ -182,9 +182,7 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen3() {
|
||||
" #444444 used# %d (%d%%)\n"
|
||||
" #444444 max used# %lu\n"
|
||||
" #444444 frag# %d%%\n"
|
||||
" #444444 free# %d"
|
||||
"\n"
|
||||
"#444444 Steps# %i",
|
||||
" #444444 free# %d",
|
||||
bleAddr[5],
|
||||
bleAddr[4],
|
||||
bleAddr[3],
|
||||
@@ -195,8 +193,7 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen3() {
|
||||
mon.used_pct,
|
||||
mon.max_used,
|
||||
mon.frag_pct,
|
||||
static_cast<int>(mon.free_biggest_size),
|
||||
0);
|
||||
static_cast<int>(mon.free_biggest_size));
|
||||
lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0);
|
||||
return std::make_unique<Screens::Label>(2, 5, app, label);
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include "Screen.h"
|
||||
#include "ScreenList.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "displayapp/screens/ScreenList.h"
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Controllers {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "Tile.h"
|
||||
#include "../DisplayApp.h"
|
||||
#include "BatteryIcon.h"
|
||||
#include "displayapp/screens/Tile.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/screens/BatteryIcon.h"
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -3,8 +3,8 @@
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include "Screen.h"
|
||||
#include "../Apps.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "displayapp/Apps.h"
|
||||
#include "components/datetime/DateTimeController.h"
|
||||
#include "components/settings/Settings.h"
|
||||
#include "components/datetime/DateTimeController.h"
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include "Timer.h"
|
||||
#include "displayapp/screens/Timer.h"
|
||||
|
||||
#include "Screen.h"
|
||||
#include "Symbols.h"
|
||||
#include "lvgl/lvgl.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "components/datetime/DateTimeController.h"
|
||||
#include "systemtask/SystemTask.h"
|
||||
#include "../LittleVgl.h"
|
||||
#include "displayapp/LittleVgl.h"
|
||||
|
||||
#include "components/timer/TimerController.h"
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "Twos.h"
|
||||
#include "displayapp/screens/Twos.h"
|
||||
#include <array>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <lvgl/src/lv_core/lv_obj.h>
|
||||
#include "Screen.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Applications {
|
||||
|
@@ -1,9 +1,11 @@
|
||||
#include <libs/lvgl/lvgl.h>
|
||||
#include "WatchFaceAnalog.h"
|
||||
#include "BatteryIcon.h"
|
||||
#include "BleIcon.h"
|
||||
#include "Symbols.h"
|
||||
#include "NotificationIcon.h"
|
||||
#include "displayapp/screens/WatchFaceAnalog.h"
|
||||
#include <cmath>
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "displayapp/screens/BatteryIcon.h"
|
||||
#include "displayapp/screens/BleIcon.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
#include "displayapp/screens/NotificationIcon.h"
|
||||
#include "components/settings/Settings.h"
|
||||
|
||||
LV_IMG_DECLARE(bg_clock);
|
||||
|
||||
@@ -73,7 +75,7 @@ WatchFaceAnalog::WatchFaceAnalog(Pinetime::Applications::DisplayApp* app,
|
||||
notificationIcon = lv_label_create(lv_scr_act(), NULL);
|
||||
lv_obj_set_style_local_text_color(notificationIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x00FF00));
|
||||
lv_label_set_text(notificationIcon, NotificationIcon::GetIcon(false));
|
||||
lv_obj_align(notificationIcon, NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
|
||||
lv_obj_align(notificationIcon, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0);
|
||||
|
||||
// Date - Day / Week day
|
||||
|
||||
|
@@ -4,8 +4,7 @@
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include "Screen.h"
|
||||
#include "ScreenList.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "components/datetime/DateTimeController.h"
|
||||
#include "components/battery/BatteryController.h"
|
||||
#include "components/ble/BleController.h"
|
||||
|
@@ -1,17 +1,18 @@
|
||||
#include "WatchFaceDigital.h"
|
||||
#include "displayapp/screens/WatchFaceDigital.h"
|
||||
|
||||
#include <date/date.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <cstdio>
|
||||
#include "BatteryIcon.h"
|
||||
#include "BleIcon.h"
|
||||
#include "NotificationIcon.h"
|
||||
#include "Symbols.h"
|
||||
#include "displayapp/screens/BatteryIcon.h"
|
||||
#include "displayapp/screens/BleIcon.h"
|
||||
#include "displayapp/screens/NotificationIcon.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
#include "components/battery/BatteryController.h"
|
||||
#include "components/ble/BleController.h"
|
||||
#include "components/ble/NotificationManager.h"
|
||||
#include "components/heartrate/HeartRateController.h"
|
||||
#include "components/motion/MotionController.h"
|
||||
#include "components/settings/Settings.h"
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
WatchFaceDigital::WatchFaceDigital(DisplayApp* app,
|
||||
|
@@ -4,8 +4,7 @@
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include "Screen.h"
|
||||
#include "ScreenList.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include "components/datetime/DateTimeController.h"
|
||||
|
||||
namespace Pinetime {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "QuickSettings.h"
|
||||
#include "displayapp/screens/settings/QuickSettings.h"
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
#include "displayapp/screens/BatteryIcon.h"
|
||||
|
@@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <FreeRTOS.h>
|
||||
#include <timers.h>
|
||||
#include "displayapp/screens/Screen.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "components/datetime/DateTimeController.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "SettingDisplay.h"
|
||||
#include "displayapp/screens/settings/SettingDisplay.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/Messages.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "SettingSetDate.h"
|
||||
#include "displayapp/screens/settings/SettingSetDate.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <hal/nrf_rtc.h>
|
||||
#include <nrf_log.h>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "SettingSetTime.h"
|
||||
#include "displayapp/screens/settings/SettingSetTime.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <hal/nrf_rtc.h>
|
||||
#include <nrf_log.h>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "SettingSteps.h"
|
||||
#include "displayapp/screens/settings/SettingSteps.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/screens/Symbols.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "SettingTimeFormat.h"
|
||||
#include "displayapp/screens/settings/SettingTimeFormat.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "SettingWakeUp.h"
|
||||
#include "displayapp/screens/settings/SettingWakeUp.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "SettingWatchFace.h"
|
||||
#include "displayapp/screens/settings/SettingWatchFace.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include "displayapp/screens/Screen.h"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "Settings.h"
|
||||
#include "displayapp/screens/settings/Settings.h"
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <array>
|
||||
#include "displayapp/screens/List.h"
|
||||
|
Reference in New Issue
Block a user