From 9e3a4333f419b1ff0452878c17ca53d79ec7196b Mon Sep 17 00:00:00 2001 From: SGE Date: Tue, 2 Apr 2024 09:55:34 +0200 Subject: [PATCH] set time out for release --- esphome/components/icnt86/icnt86.cpp | 6 +++--- esphome/components/icnt86/touchscreen.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/components/icnt86/icnt86.cpp b/esphome/components/icnt86/icnt86.cpp index bceaf3c020..7b083a1e47 100644 --- a/esphome/components/icnt86/icnt86.cpp +++ b/esphome/components/icnt86/icnt86.cpp @@ -53,9 +53,9 @@ void ICNT86Touchscreen::update_touches() { UWORD y = ((UWORD) buf[4 + 7 * i] << 8) + buf[3 + 7 * i]; UWORD p = buf[5 + 7 * i]; UWORD touch_evenid = buf[6 + 7 * i]; - ESP_LOGD(TAG, "Touch x: %d, y: %d, p: %d", x, y, p); - - this->add_raw_touch_position_(touch_evenid, x, y, p); + if (this->touches_.count(touch_evenid) == 0 || (x != this->touches_[touch_evenid].x_prev && y != this->touches_[touch_evenid].y_prev)) { + this->add_raw_touch_position_(touch_evenid, x, y, p); + } } } } diff --git a/esphome/components/icnt86/touchscreen.py b/esphome/components/icnt86/touchscreen.py index 0bce74707e..bb686c3ec7 100644 --- a/esphome/components/icnt86/touchscreen.py +++ b/esphome/components/icnt86/touchscreen.py @@ -20,7 +20,7 @@ ICNT86Touchscreen = icnt86_ns.class_( CONF_ICNT86_ID = "icnt86_id" CONF_RTS_PIN = "rts_pin" -CONFIG_SCHEMA = touchscreen.TOUCHSCREEN_SCHEMA.extend( +CONFIG_SCHEMA = touchscreen.touchscreen_schema('250ms').extend( cv.Schema( { cv.GenerateID(): cv.declare_id(ICNT86Touchscreen),