Fix touch wakeup and code cleanup

This commit is contained in:
Riku Isokoski
2021-07-16 01:49:20 +03:00
parent 2a3e126390
commit 93ccbf38e8
7 changed files with 43 additions and 53 deletions

View File

@@ -2,9 +2,7 @@
using namespace Pinetime::Controllers;
TouchHandler::TouchHandler(Drivers::Cst816S& touchPanel, Components::LittleVgl& lvgl)
: touchPanel {touchPanel},
lvgl {lvgl} {
TouchHandler::TouchHandler(Drivers::Cst816S& touchPanel, Components::LittleVgl& lvgl) : touchPanel {touchPanel}, lvgl {lvgl} {
}
void TouchHandler::CancelTap() {
@@ -35,6 +33,7 @@ void TouchHandler::Work() {
vTaskSuspend(taskHandle);
info = touchPanel.GetTouchInfo();
if (systemTask->IsSleeping()) {
gesture = info.gesture;
systemTask->PushMessage(System::Messages::TouchWakeUp);
} else {
x = info.x;