From 27464cf4dd8f8bb9c8ab29ef7acce382301860cc Mon Sep 17 00:00:00 2001 From: Z Date: Mon, 1 Jul 2024 16:45:05 +0800 Subject: [PATCH] fixed protocol error code check --- .../EGFramework/Module/ProtocolExtension/EGModbusExtension.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/EGFramework/Module/ProtocolExtension/EGModbusExtension.cs b/addons/EGFramework/Module/ProtocolExtension/EGModbusExtension.cs index 4a701c1..a6c38f2 100644 --- a/addons/EGFramework/Module/ProtocolExtension/EGModbusExtension.cs +++ b/addons/EGFramework/Module/ProtocolExtension/EGModbusExtension.cs @@ -783,7 +783,7 @@ namespace EGFramework{ DeviceAddress = protocolBytes[0]; FunctionCode = protocolBytes[1]; FunctionType = (ModbusFunctionType)protocolBytes[1]; - if(FunctionCode == 0x83){ + if(FunctionCode >= 0x80){ ErrorCode = (ModbusErrorCode)protocolBytes[2]; IsError = true; return true;