fix
zhangqian
2023-10-30 093d3074c8d7b06c58ca6a0b6d281b916c5d95d1
fix
1个文件已修改
7 ■■■■■ 已修改文件
pkg/plc/modbusx/connection_manager.go 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pkg/plc/modbusx/connection_manager.go
@@ -3,7 +3,6 @@
import (
    "apsClient/conf"
    "apsClient/model/common"
    "apsClient/pkg/logx"
    "github.com/goburrow/modbus"
    "sync"
    "time"
@@ -105,11 +104,5 @@
    rtuHandler.StopBits = c.StopBit
    rtuHandler.SlaveId = 1
    rtuHandler.Timeout = 5 * time.Second
    err := rtuHandler.Connect()
    if err != nil {
        logx.Errorf("getModbusRTUConnection  Connect err:%v, config: %+v", err, c)
        return nil
    }
    return modbus.NewClient(rtuHandler)
}