From 17fdb4f5c90a7f5b6fb5c21f8e4378f170e385f4 Mon Sep 17 00:00:00 2001 From: Robin Meis Date: Thu, 1 Aug 2024 19:49:47 +0200 Subject: [PATCH] Allow lower values for touch threshold --- wled00/cfg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index f9a94e228..369ddada0 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -296,7 +296,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { #ifdef SOC_TOUCH_VERSION_2 // ESP32 S2 and S3 have a function to check touch state but need to attach an interrupt to do so else { - touchAttachInterrupt(btnPin[s], touchButtonISR, 256 + (touchThreshold << 4)); // threshold on Touch V2 is much higher (1500 is a value given by Espressif example, I measured changes of over 5000) + touchAttachInterrupt(btnPin[s], touchButtonISR, touchThreshold << 4); // threshold on Touch V2 is much higher (1500 is a value given by Espressif example, I measured changes of over 5000) } #endif }