summaryrefslogtreecommitdiff
path: root/src/systemtask/SystemTask.cpp
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2021-08-10 22:03:34 +0300
committerRiku Isokoski <riksu9000@gmail.com>2021-08-10 22:03:34 +0300
commit8a694adb0979339664da0af6d51c480d26c5527b (patch)
tree89c0deb381b34d3060edfcee249a9e5177244e67 /src/systemtask/SystemTask.cpp
parent7e92577c14895f57f5adda27ad54adbbc4b7ffe9 (diff)
Rework TouchHandler into not a task
Diffstat (limited to 'src/systemtask/SystemTask.cpp')
-rw-r--r--src/systemtask/SystemTask.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp
index 7ba7cf69..5f363130 100644
--- a/src/systemtask/SystemTask.cpp
+++ b/src/systemtask/SystemTask.cpp
@@ -150,9 +150,6 @@ void SystemTask::Work() {
heartRateSensor.Disable();
heartRateApp.Start();
- touchHandler.Register(this);
- touchHandler.Start();
-
nrf_gpio_cfg_sense_input(pinButton, (nrf_gpio_pin_pull_t) GPIO_PIN_CNF_PULL_Pulldown, (nrf_gpio_pin_sense_t) GPIO_PIN_CNF_SENSE_High);
nrf_gpio_cfg_output(15);
nrf_gpio_pin_set(15);
@@ -244,6 +241,8 @@ void SystemTask::Work() {
isDimmed = false;
break;
case Messages::TouchWakeUp: {
+ twiMaster.Wakeup();
+ touchHandler.GetNewTouchInfo();
auto gesture = touchHandler.GestureGet();
if ((gesture == Pinetime::Drivers::Cst816S::Gestures::DoubleTap &&
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) ||
@@ -299,6 +298,9 @@ void SystemTask::Work() {
xTimerStart(dimTimer, 0);
break;
case Messages::OnTouchEvent:
+ if (touchHandler.GetNewTouchInfo()) {
+ touchHandler.UpdateLvglTouchPoint();
+ }
ReloadIdleTimer();
break;
case Messages::OnButtonEvent: