Skip to content

Commit 917cd96

Browse files
committed
don't complain about button pin = -1
1 parent 20ad6d2 commit 917cd96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wled00/set.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
174174
if (((buttonType[i] == BTN_TYPE_ANALOG) || (buttonType[i] == BTN_TYPE_ANALOG_INVERTED)) && (digitalPinToAnalogChannel(btnPin[i]) < 0))
175175
{
176176
// not an ADC analog pin
177-
DEBUG_PRINTF("PIN ALLOC error: GPIO%d for analog button #%d is not an analog pin!\n", btnPin[i], i);
177+
if (btnPin[i] >= 0) DEBUG_PRINTF("PIN ALLOC error: GPIO%d for analog button #%d is not an analog pin!\n", btnPin[i], i);
178178
btnPin[i] = -1;
179179
pinManager.deallocatePin(hw_btn_pin,PinOwner::Button);
180180
}

0 commit comments

Comments
 (0)