From 954f26308b66e19f4a1ad11fc5772b9c79f1e508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Sun, 7 Apr 2024 22:12:01 +0200 Subject: [PATCH] Update button.cpp Indentation fix --- wled00/button.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/wled00/button.cpp b/wled00/button.cpp index e3bd47882..06683e17a 100644 --- a/wled00/button.cpp +++ b/wled00/button.cpp @@ -100,18 +100,14 @@ bool isButtonPressed(uint8_t i) case BTN_TYPE_TOUCH_SWITCH: #if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3) #ifdef SOC_TOUCH_VERSION_2 //ESP32 S2 and S3 provide a function to check touch state (state is updated in interrupt) - if (touchInterruptGetLastStatus(pin)) - return true; + if (touchInterruptGetLastStatus(pin)) return true; #else - if (digitalPinToTouchChannel(btnPin[i]) >= 0 && touchRead(pin) <= touchThreshold) - { - return true; - } + if (digitalPinToTouchChannel(btnPin[i]) >= 0 && touchRead(pin) <= touchThreshold) return true; #endif #endif break; - } - return false; + } + return false; } void handleSwitch(uint8_t b) @@ -418,4 +414,4 @@ void handleIO() void IRAM_ATTR touchButtonISR() { // used for ESP32 S2 and S3: nothing to do, ISR is just used to update registers of HAL driver -} \ No newline at end of file +}