From 8ef0a56dd8682e048a938f83b894ef4d62422ee6 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Sun, 1 Jan 2023 21:30:21 +0100 Subject: [PATCH] usermod rotary - dont register pins if disabled --- .../usermod_v2_rotary_encoder_ui_ALT.h | 1 + 1 file changed, 1 insertion(+) diff --git a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h index 8b1fee8e..e6e3d1ff 100644 --- a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h +++ b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h @@ -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