adds VARIANT_TOUCHSCREEN and ENABLE_TOUCH_INT (#10815)

* addsVARIANT_TOUCHSCREEN and ENABLE_TOUCH_INT

* Remove a duplicated _getTouch function pointer
This commit is contained in:
Jonathan Bennett
2026-06-30 00:28:24 -05:00
committed by GitHub
parent 21dbe21745
commit 87bb149afb
6 files changed
+87 -1

No files matched your search

+6
View File
@@ -66,8 +66,14 @@ void TouchScreenBase::init(bool hasTouch)
int32_t TouchScreenBase::runOnce()
{
uint32_t nowMs = millis();
if (nowMs - _lastRun < 20) { // suppress too fast consecutive runOnce() executions
return 20;
}
_lastRun = nowMs;
TouchEvent e;
e.touchEvent = static_cast<char>(TOUCH_ACTION_NONE);
this->setInterval(TOUCH_POLL_INTERVAL_IDLE);
const bool fastTapMode = fastTapModeEnabled();
const bool allowLongPress = longPressEnabled();