summaryrefslogtreecommitdiff
path: root/src/DisplayApp/DisplayApp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/DisplayApp/DisplayApp.h')
-rw-r--r--src/DisplayApp/DisplayApp.h34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/DisplayApp/DisplayApp.h b/src/DisplayApp/DisplayApp.h
index eaad1baa..09f0d1cd 100644
--- a/src/DisplayApp/DisplayApp.h
+++ b/src/DisplayApp/DisplayApp.h
@@ -7,6 +7,7 @@
#include <bits/unique_ptr.h>
#include <queue.h>
#include <Components/Battery/BatteryController.h>
+#include <Components/Brightness/BrightnessController.h>
#include <Components/Ble/BleController.h>
#include <Components/DateTime/DateTimeController.h>
#include "Fonts/lcdfont14.h"
@@ -14,6 +15,10 @@
#include "LittleVgl.h"
#include <date/date.h>
#include <DisplayApp/Screens/Clock.h>
+#include <drivers/Watchdog.h>
+#include <DisplayApp/Screens/Modal.h>
+#include <Components/Ble/NotificationManager.h>
+#include "TouchEvents.h"
namespace Pinetime {
@@ -24,22 +29,24 @@ namespace Pinetime {
class DisplayApp {
public:
enum class States {Idle, Running};
- enum class Messages : uint8_t {GoToSleep, GoToRunning, UpdateDateTime, UpdateBleConnection, UpdateBatteryLevel, TouchEvent, SwitchScreen,ButtonPushed} ;
- enum class TouchEvents { None, Tap, SwipeLeft, SwipeRight, SwipeUp, SwipeDown, LongTap, DoubleTap
+ enum class Messages : uint8_t {GoToSleep, GoToRunning, UpdateDateTime, UpdateBleConnection, UpdateBatteryLevel, TouchEvent, SwitchScreen,ButtonPushed,
+ NewNotification
};
- DisplayApp(Pinetime::Drivers::St7789& lcd,
- Pinetime::Components::LittleVgl& lvgl,
- Pinetime::Drivers::Cst816S&,
- Controllers::Battery &batteryController,
- Controllers::Ble &bleController,
- Controllers::DateTime& dateTimeController,
- Pinetime::System::SystemTask& systemTask);
+ enum class FullRefreshDirections { None, Up, Down };
+
+
+ DisplayApp(Drivers::St7789 &lcd, Components::LittleVgl &lvgl, Drivers::Cst816S &,
+ Controllers::Battery &batteryController, Controllers::Ble &bleController,
+ Controllers::DateTime &dateTimeController, Drivers::WatchdogView &watchdog,
+ System::SystemTask &systemTask,
+ Pinetime::Controllers::NotificationManager& notificationManager);
void Start();
void PushMessage(Messages msg);
- enum class Apps {None, Launcher, Clock, Test, Meter, Gauge};
+ enum class Apps {None, Launcher, Clock, SysInfo, Meter, Gauge, Brightness};
void StartApp(Apps app);
+ void SetFullRefresh(FullRefreshDirections direction);
private:
TaskHandle_t taskHandle;
static void Process(void* instance);
@@ -59,20 +66,21 @@ namespace Pinetime {
Pinetime::Controllers::Battery &batteryController;
Pinetime::Controllers::Ble &bleController;
Pinetime::Controllers::DateTime& dateTimeController;
+ Pinetime::Drivers::WatchdogView& watchdog;
Pinetime::Drivers::Cst816S& touchPanel;
TouchEvents OnTouchEvent();
std::unique_ptr<Screens::Screen> currentScreen;
- static constexpr uint8_t pinLcdBacklight1 = 14;
- static constexpr uint8_t pinLcdBacklight2 = 22;
- static constexpr uint8_t pinLcdBacklight3 = 23;
bool isClock = true;
Pinetime::System::SystemTask& systemTask;
Apps nextApp = Apps::None;
bool onClockApp = false; // TODO find a better way to know that we should handle gestures and button differently for the Clock app.
+ Controllers::BrightnessController brightnessController;
+ std::unique_ptr<Screens::Modal> modal;
+ Pinetime::Controllers::NotificationManager& notificationManager;
};
}
}