kopia lustrzana https://github.com/Aircoookie/WLED
don't complain about button pin = -1
rodzic
20ad6d239d
commit
917cd96a3d
|
|
@ -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))
|
if (((buttonType[i] == BTN_TYPE_ANALOG) || (buttonType[i] == BTN_TYPE_ANALOG_INVERTED)) && (digitalPinToAnalogChannel(btnPin[i]) < 0))
|
||||||
{
|
{
|
||||||
// not an ADC analog pin
|
// 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;
|
btnPin[i] = -1;
|
||||||
pinManager.deallocatePin(hw_btn_pin,PinOwner::Button);
|
pinManager.deallocatePin(hw_btn_pin,PinOwner::Button);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue