From 01df65c7ab44e55559e511b67d71d262e3ad7c48 Mon Sep 17 00:00:00 2001 From: Patrick Grawehr Date: Mon, 22 Feb 2021 16:27:19 +0100 Subject: [PATCH] Update src/devices/Arduino/ArduinoGpioControllerDriver.cs Co-authored-by: Krzysztof Wicher --- src/devices/Arduino/ArduinoGpioControllerDriver.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/devices/Arduino/ArduinoGpioControllerDriver.cs b/src/devices/Arduino/ArduinoGpioControllerDriver.cs index 9f4895597a..e55e6a3bd3 100644 --- a/src/devices/Arduino/ArduinoGpioControllerDriver.cs +++ b/src/devices/Arduino/ArduinoGpioControllerDriver.cs @@ -131,12 +131,7 @@ protected override bool IsPinModeSupported(int pinNumber, PinMode mode) } var pinConfig = _supportedPinConfigurations.FirstOrDefault(x => x.Pin == pinNumber); - if (pinConfig == null || !pinConfig.PinModes.Contains(firmataMode)) - { - return false; - } - - return true; + return pinConfig != null && pinConfig.PinModes.Contains(firmataMode); } protected override PinValue Read(int pinNumber)