diff options
author | JF <jf@codingfield.com> | 2020-02-16 18:32:36 +0100 |
---|---|---|
committer | JF <jf@codingfield.com> | 2020-02-16 18:32:36 +0100 |
commit | 167a0ffc873a2442af43d0347efd00f84932b8cc (patch) | |
tree | 2e131e3c97b1c67e0dff6bab516a1fe5958e1741 /src/DisplayApp/DisplayApp.h | |
parent | 52539a5ff1b6f52c65b032ef1668d43d4df2dc24 (diff) |
Add touch panel port to lvgl.
PoC of user interaction with 3 screen (clock, menu and app).
Diffstat (limited to 'src/DisplayApp/DisplayApp.h')
-rw-r--r-- | src/DisplayApp/DisplayApp.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/DisplayApp/DisplayApp.h b/src/DisplayApp/DisplayApp.h index 8cd26ce8..f8101536 100644 --- a/src/DisplayApp/DisplayApp.h +++ b/src/DisplayApp/DisplayApp.h @@ -23,7 +23,7 @@ namespace Pinetime { class DisplayApp { public: enum class States {Idle, Running}; - enum class Messages : uint8_t {GoToSleep, GoToRunning, UpdateDateTime, UpdateBleConnection, UpdateBatteryLevel, TouchEvent} ; + enum class Messages : uint8_t {GoToSleep, GoToRunning, UpdateDateTime, UpdateBleConnection, UpdateBatteryLevel, TouchEvent, SwitchScreen,ButtonPushed} ; DisplayApp(Pinetime::Drivers::St7789& lcd, Pinetime::Components::Gfx& gfx, Pinetime::Components::LittleVgl& lvgl, @@ -60,12 +60,12 @@ namespace Pinetime { Pinetime::Drivers::Cst816S& touchPanel; void OnTouchEvent(); - Screens::Clock clockScreen; - Screens::Message messageScreen; - Screens::Screen* currentScreen = nullptr; + 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; }; } } |