From 7ee14724fca66ed8bc80a247cb5c93c51cdfce82 Mon Sep 17 00:00:00 2001 From: bole5 Date: Tue, 8 Feb 2022 00:03:20 +0100 Subject: [PATCH 1/2] Improve Pin Manager Debugging (#2532) --- wled00/pin_manager.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/wled00/pin_manager.cpp b/wled00/pin_manager.cpp index 2b9085576..07db3f76f 100644 --- a/wled00/pin_manager.cpp +++ b/wled00/pin_manager.cpp @@ -132,6 +132,13 @@ bool PinManagerClass::allocateMultiplePins(const managed_pin_type * mptArray, by byte bi = gpio - 8*by; bitWrite(pinAlloc[by], bi, true); ownerTag[gpio] = tag; + #ifdef WLED_DEBUG + DEBUG_PRINT(F("PIN ALLOC: Pin ")); + DEBUG_PRINT(gpio); + DEBUG_PRINT(F(" allocated by ")); + DebugPrintOwnerTag(tag); + DEBUG_PRINTLN(F("")); + #endif } return true; } @@ -155,7 +162,14 @@ bool PinManagerClass::allocatePin(byte gpio, bool output, PinOwner tag) byte bi = gpio - 8*by; bitWrite(pinAlloc[by], bi, true); ownerTag[gpio] = tag; - + #ifdef WLED_DEBUG + DEBUG_PRINT(F("PIN ALLOC: Pin ")); + DEBUG_PRINT(gpio); + DEBUG_PRINT(F(" allocated by ")); + DebugPrintOwnerTag(tag); + DEBUG_PRINTLN(F("")); + #endif + return true; } From f9bce5410433feb27fb6b9495d5360b68e850f0d Mon Sep 17 00:00:00 2001 From: bole5 Date: Tue, 8 Feb 2022 00:15:24 +0100 Subject: [PATCH 2/2] Change Default Relay Pin to -1 (#2531) --- wled00/wled.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/wled.h b/wled00/wled.h index 17eaaa7a2..3f1512806 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -225,7 +225,7 @@ WLED_GLOBAL int8_t btnPin[WLED_MAX_BUTTONS] _INIT({0}); WLED_GLOBAL int8_t btnPin[WLED_MAX_BUTTONS] _INIT({BTNPIN}); #endif #ifndef RLYPIN -WLED_GLOBAL int8_t rlyPin _INIT(12); +WLED_GLOBAL int8_t rlyPin _INIT(-1); #else WLED_GLOBAL int8_t rlyPin _INIT(RLYPIN); #endif