From 8532517c4e7f5dcf62708aceb1985873bc09bd78 Mon Sep 17 00:00:00 2001 From: travis-farmer Date: Mon, 16 Dec 2024 10:21:47 -0500 Subject: [PATCH] fixed return states --- IO_RSproto.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/IO_RSproto.cpp b/IO_RSproto.cpp index edfd666..8c86595 100644 --- a/IO_RSproto.cpp +++ b/IO_RSproto.cpp @@ -306,9 +306,10 @@ bool RSprotonode::_configure(VPIN vpin, ConfigTypeEnum configType, int paramCoun while (resFlag == 0 && millis() - startMillis < 500); // blocking for now if (resFlag != 1) { DIAG(F("EX-IOExpander485 Vpin %u cannot be used as a digital input pin"), pin); + return false; } resFlag = 0; - return false; + return true; } int RSprotonode::_configureAnalogIn(VPIN vpin) { @@ -320,9 +321,10 @@ bool RSprotonode::_configure(VPIN vpin, ConfigTypeEnum configType, int paramCoun while (resFlag == 0 && millis() - startMillis < 500); // blocking for now if (resFlag != 1) { DIAG(F("EX-IOExpander485 Vpin %u cannot be used as a digital input pin"), pin); + return false; } resFlag = 0; - return false; + return true; } void RSprotonode::_begin() {