From 8324f872ef3a4d0c978a9b1d062800c6a1701c12 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 01 十二月 2023 09:58:17 +0800
Subject: [PATCH] fix

---
 pkg/plc/modbusx/connection_manager.go |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pkg/plc/modbusx/connection_manager.go b/pkg/plc/modbusx/connection_manager.go
index 57be879..b8b83ad 100644
--- a/pkg/plc/modbusx/connection_manager.go
+++ b/pkg/plc/modbusx/connection_manager.go
@@ -100,7 +100,7 @@
 	rtuHandler = modbus.NewRTUClientHandler(c.SerialName)
 	rtuHandler.BaudRate = c.BaudRate
 	rtuHandler.DataBits = c.DataBit
-	rtuHandler.Parity = c.Parity.String()
+	rtuHandler.Parity = c.Parity.ToString()
 	rtuHandler.StopBits = c.StopBit
 	rtuHandler.SlaveId = 1
 	rtuHandler.Timeout = 5 * time.Second

--
Gitblit v1.8.0