From 939c18261338dae735aeea36b10f2908a1dfa0a5 Mon Sep 17 00:00:00 2001 From: SGE Date: Tue, 12 Dec 2023 16:59:32 +0100 Subject: [PATCH] release after touch --- esphome/components/icnt86/icnt86.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/esphome/components/icnt86/icnt86.cpp b/esphome/components/icnt86/icnt86.cpp index 24b55dda53..98ca0274c5 100644 --- a/esphome/components/icnt86/icnt86.cpp +++ b/esphome/components/icnt86/icnt86.cpp @@ -44,6 +44,8 @@ void ICNT86Touchscreen::setup() { void ICNT86Touchscreen::loop() { if (!this->store_.touch) { + for (auto *listener : this->touch_listeners_) + listener->release(); return; } ESP_LOGD(TAG, "touch"); @@ -62,6 +64,8 @@ void ICNT86Touchscreen::loop() { if (buf[0] == 0x00) { // No new touch this->ICNT_Write_(0x1001, mask, 1); delay(1); + for (auto *listener : this->touch_listeners_) + listener->release(); return; } else { if (touch_count > 5 || touch_count < 1) {