From 917cd96a3d15167076c00f30567cfab3bf88b860 Mon Sep 17 00:00:00 2001 From: Frank Date: Sat, 10 Dec 2022 21:03:58 +0100 Subject: [PATCH] don't complain about button pin = -1 --- wled00/set.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/set.cpp b/wled00/set.cpp index 30a77fd4..0369e2e3 100644 --- a/wled00/set.cpp +++ b/wled00/set.cpp @@ -174,7 +174,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage) if (((buttonType[i] == BTN_TYPE_ANALOG) || (buttonType[i] == BTN_TYPE_ANALOG_INVERTED)) && (digitalPinToAnalogChannel(btnPin[i]) < 0)) { // not an ADC analog pin - DEBUG_PRINTF("PIN ALLOC error: GPIO%d for analog button #%d is not an analog pin!\n", btnPin[i], i); + if (btnPin[i] >= 0) DEBUG_PRINTF("PIN ALLOC error: GPIO%d for analog button #%d is not an analog pin!\n", btnPin[i], i); btnPin[i] = -1; pinManager.deallocatePin(hw_btn_pin,PinOwner::Button); }