Rework TouchHandler into not a task
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user