T-Watch fixes

This commit is contained in:
mverch67
2023-08-08 18:06:39 +02:00
parent 04bbdc6b8a
commit 0fe99b0caa
9 changed files with 41 additions and 20 deletions

View File

@@ -40,13 +40,13 @@ int32_t TouchScreenBase::runOnce()
int16_t x, y;
bool touched = getTouch(x, y);
if (touched) {
hapticFeedback();
this->setInterval(20);
_last_x = x;
_last_y = y;
}
if (touched != _touchedOld) {
if (touched) {
hapticFeedback();
_state = TOUCH_EVENT_OCCURRED;
_start = millis();
_first_x = x;

View File

@@ -1,5 +1,6 @@
#include "TouchScreenImpl1.h"
#include "InputBroker.h"
#include "PowerFSM.h"
#include "configuration.h"
TouchScreenImpl1 *touchScreenImpl1;
@@ -61,6 +62,10 @@ void TouchScreenImpl1::onEvent(const TouchEvent &event)
e.inputEvent = static_cast<char>(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_CANCEL);
break;
}
case TOUCH_ACTION_TAP: {
powerFSM.trigger(EVENT_INPUT);
break;
}
default:
return;
}