From 9e2fbcdc62bc4b45519715c8243446a11ee011cf Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期三, 20 十二月 2023 17:26:27 +0800
Subject: [PATCH] goborrow rtu地址-1

---
 crontask/cron_task.go |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/crontask/cron_task.go b/crontask/cron_task.go
index 0199a20..da24026 100644
--- a/crontask/cron_task.go
+++ b/crontask/cron_task.go
@@ -38,7 +38,7 @@
 		}
 		for _, addressItem := range plcConfig.Details {
 			if addressItem.FieldName == constvar.PlcStartAddressTypeFinishNumber {
-				value, err := service.PlcReadDirect(plcConfig, addressItem.StartAddress, addressItem.Length, addressItem.Type)
+				value, err := service.PlcReadDirect(plcConfig, addressItem)
 				if err != nil {
 					logx.Infof("plc read finish number err: %v", err)
 					continue
@@ -64,7 +64,7 @@
 		}
 		for _, addressItem := range plcConfig.Details {
 			if addressItem.FieldName == constvar.PlcStartAddressTypeTotalNumber {
-				value, err := service.PlcReadDirect(plcConfig, addressItem.StartAddress, addressItem.Length, addressItem.Type)
+				value, err := service.PlcReadDirect(plcConfig, addressItem)
 				if err != nil {
 					logx.Infof("plc read total number err: %v", err)
 					continue

--
Gitblit v1.8.0