From f79cf0243b8686b2b63cda7c5101dd005e44a661 Mon Sep 17 00:00:00 2001 From: PopCorn Date: Thu, 13 Nov 2025 15:21:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=A0=81=E6=95=B0=E6=8D=AE=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client.go b/client.go index 9599246..a22e2a5 100644 --- a/client.go +++ b/client.go @@ -1188,11 +1188,11 @@ func (mc *ModbusClient) readRegistersWithFunctionCode(addr uint16, quantity uint unitId: mc.unitId, } - if functionCode != fcCustomize { - err = ErrUnexpectedParameters - mc.logger.Errorf("unexpected function code (%d)", functionCode) - return - } + // if functionCode != fcCustomize { + // err = ErrUnexpectedParameters + // mc.logger.Errorf("unexpected function code (%d)", functionCode) + // return + // } if functionCode == 0 { err = ErrUnexpectedParameters