From 3c8f5c2151e4239b1a8b54c05e974751b6212abe Mon Sep 17 00:00:00 2001 From: maqiao <625215135@qq.com> Date: Thu, 25 Jul 2024 13:03:35 +0800 Subject: [PATCH] =?UTF-8?q?ResetData=E6=96=B9=E6=B3=95=E6=B7=BB=E5=8A=A0Ta?= =?UTF-8?q?sk=E5=85=B3=E9=94=AE=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DM_Weight/Port/PortUtil.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DM_Weight/Port/PortUtil.cs b/DM_Weight/Port/PortUtil.cs index 18d8bf7..73b427a 100644 --- a/DM_Weight/Port/PortUtil.cs +++ b/DM_Weight/Port/PortUtil.cs @@ -80,7 +80,7 @@ namespace DM_Weight.Port public DateTime dateTime { get; set; } = DateTime.Now; - public async void ResetData() + public async Task ResetData() { logger.Info($"重新设置串口数据状态【{statue}】,抽屉【{DrawerNo}】"); if (!"HomeWindow".Equals(WindowName) && statue == 1) @@ -437,15 +437,15 @@ namespace DM_Weight.Port await BoxLockLightOff2(); } string _WindowName = WindowName; + logger.Info($"抽屉【{DrawerNo}】已关闭"); // 重新初始化数据 - ResetData(); + await ResetData(); // 返回消息 抽屉已经关闭 _eventAggregator.GetEvent().Publish(new util.DeviceMsg() { EventType = util.EventType.DRAWERCLOSE, WindowName = _WindowName, }); - logger.Info($"抽屉【{DrawerNo}】已关闭"); } }