From cd1bee5c1e52d1fa546ca5c900121dc0c95772c7 Mon Sep 17 00:00:00 2001 From: xyy <544939200@qq.com> Date: Sat, 18 Apr 2026 09:11:19 +0800 Subject: [PATCH] --- 全自动水压检测仪/NormalTemperatureMode.cs | 44 ++++++++++++----------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/全自动水压检测仪/NormalTemperatureMode.cs b/全自动水压检测仪/NormalTemperatureMode.cs index 3b1c45a..dfc44bd 100644 --- a/全自动水压检测仪/NormalTemperatureMode.cs +++ b/全自动水压检测仪/NormalTemperatureMode.cs @@ -654,32 +654,36 @@ namespace 全自动水压检测仪 // if (percentage > 100) percentage = 100; - bool[] a = _modbusMaster?.ReadCoils(1, 10042, 1); // 常温低液位 0无水/1有水 - bool[] b = _modbusMaster?.ReadCoils(1, 10043, 1); // 常温高液位 0无水/1有水 - bool[] cc = _modbusMaster?.ReadCoils(1, 10040, 1); // 高温低液位 0无水/1有水 - bool[] d = _modbusMaster?.ReadCoils(1, 10041, 1); // 高温高液位 0无水/1有水 + bool[] a = _modbusMaster?.ReadCoils(1, 10042, 1); // 常温低液位 0无水/1有水 + bool[] b = _modbusMaster?.ReadCoils(1, 10043, 1); // 常温高液位 0无水/1有水 + bool[] cc = _modbusMaster?.ReadCoils(1, 10040, 1); // 高温低液位 0无水/1有水 + bool[] d = _modbusMaster?.ReadCoils(1, 10041, 1); // 高温高液位 0无水/1有水 - if (TryGetCoilValue(a, out bool normalSensorA) && - TryGetCoilValue(b, out bool normalSensorB)) - { - UpdateLiquidLevelStatusBar(_normalTempLevelBarSegments, normalSensorA, normalSensorB, "常温液位"); - } + if (TryGetCoilValue(a, out bool normalSensorA) && + TryGetCoilValue(b, out bool normalSensorB)) + { + UpdateLiquidLevelStatusBar(_normalTempLevelBarSegments, normalSensorA, normalSensorB, "常温液位"); + } - if (TryGetCoilValue(cc, out bool highSensorA) && - TryGetCoilValue(d, out bool highSensorB)) - { - UpdateLiquidLevelStatusBar(_highTempLevelBarSegments, highSensorA, highSensorB, "高温液位"); - } + if (TryGetCoilValue(cc, out bool highSensorA) && + TryGetCoilValue(d, out bool highSensorB)) + { + UpdateLiquidLevelStatusBar(_highTempLevelBarSegments, highSensorA, highSensorB, "高温液位"); + } + #region 调用停止 + if (a[0] || cc[0]) + { + ma?.BtnClickFunctionForNew(Function.ButtonType.复归型, 10082); + } + #endregion + //// 更新进度条 + //if (uiProcessBar1 != null && !uiProcessBar1.IsDisposed) + // uiProcessBar1.Value = (int)percentage; - - //// 更新进度条 - //if (uiProcessBar1 != null && !uiProcessBar1.IsDisposed) - // uiProcessBar1.Value = (int)percentage; - - //uiLabel12.Text = value1.ToString("F2"); + //uiLabel12.Text = value1.ToString("F2"); //} // 初始压力