BTNPIN can now be disabled by setting to -1 (fixes #1237)
Added HEX color receiving to JSON API Moved Kelvin color receiving in JSON API
This commit is contained in:
@@ -317,7 +317,7 @@ void WLED::beginStrip()
|
||||
strip.setBrightness(0);
|
||||
strip.setShowCallback(handleOverlayDraw);
|
||||
|
||||
#ifdef BTNPIN
|
||||
#if defined(BTNPIN) && BTNPIN > -1
|
||||
pinManager.allocatePin(BTNPIN, false);
|
||||
pinMode(BTNPIN, INPUT_PULLUP);
|
||||
#endif
|
||||
@@ -342,7 +342,7 @@ void WLED::beginStrip()
|
||||
#endif
|
||||
|
||||
// disable button if it is "pressed" unintentionally
|
||||
#if defined(BTNPIN) || defined(TOUCHPIN)
|
||||
#if (defined(BTNPIN) && BTNPIN > -1) || defined(TOUCHPIN)
|
||||
if (isButtonPressed())
|
||||
buttonEnabled = false;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user