From 4af4ff681d99790ac12634b413928d4905c98efd Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 14 Feb 2019 11:04:11 +0100 Subject: [PATCH] Hide templated GPIOs Hide templated GPIOs in user template too (#5222) --- sonoff/support.ino | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sonoff/support.ino b/sonoff/support.ino index c728d28eb..cfbce4548 100644 --- a/sonoff/support.ino +++ b/sonoff/support.ino @@ -783,12 +783,15 @@ uint8_t ValidPin(uint8_t pin, uint8_t gpio) bool ValidGPIO(uint8_t pin, uint8_t gpio) { bool result = false; - +/* if (USER_MODULE == Settings.module) { result = (ValidPin(pin, gpio) > GPIO_NONE); // Allow any pin } else { result = (GPIO_USER == ValidPin(pin, gpio)); // Only allow GPIO_USER pins } +*/ + result = (GPIO_USER == ValidPin(pin, gpio)); // Only allow GPIO_USER pins + return result; }