usermod rotary - dont register pins if disabled

This commit is contained in:
Frank
2023-01-01 21:30:21 +01:00
parent 6716265469
commit 8ef0a56dd8

View File

@@ -272,6 +272,7 @@ public:
DEBUG_PRINTLN(F("Invalid GPIO pins for Usermod Rotary Encoder (ALT).")); //WLEDMM add debug info
return;
}
if (!enabled) return; // WLEDMM don't allocated PINS if disabled
if (!pinManager.allocateMultiplePins(pins, 3, PinOwner::UM_RotaryEncoderUI)) {
// BUG: configuring this usermod with conflicting pins
// will cause it to de-allocate pins it does not own