From 3b16d783d3e6fa4633ed31a75063c49cd2b974af Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Sat, 21 May 2022 13:55:22 -0400 Subject: [PATCH] fixed bug with RSIO channel valid check --- scada-common/rsio.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scada-common/rsio.lua b/scada-common/rsio.lua index 5b9970a..8f981cd 100644 --- a/scada-common/rsio.lua +++ b/scada-common/rsio.lua @@ -205,7 +205,7 @@ local RS_SIDES = rs.getSides() ---@param channel RS_IO ---@return boolean valid rsio.is_valid_channel = function (channel) - return (channel ~= nil) and (channel > 0) and (channel <= #RS_IO) + return (channel ~= nil) and (channel > 0) and (channel <= RS_IO.R_PLC_TIMEOUT) end -- check if a side is valid