From 3c583b1091133e4af23c2534ae96bd094c132d58 Mon Sep 17 00:00:00 2001 From: patrick.xu <patrick.xu@broconcentric.com> Date: 星期一, 24 五月 2021 08:46:47 +0800 Subject: [PATCH] 1. 更新dll引用地址 2. 主界面PLC操作安全屏蔽功能添加密码输入界面 --- HeightDetection.cs | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HeightDetection.cs b/HeightDetection.cs index 7d4663d..c237cda 100644 --- a/HeightDetection.cs +++ b/HeightDetection.cs @@ -305,11 +305,11 @@ double standardGap = opcConfig.batteryHeightLimit.Max - standardValue; double gap = adjustValue - standardValue; - fakeValue = finalHeight = (gap / (errorBand / 2.0)) * standardGap + standardValue; + fakeValue = finalHeight = Math.Round(((gap / (errorBand / 2.0)) * standardGap + standardValue), 5); if (finalHeight < opcConfig.batteryHeightLimit.Min || finalHeight > opcConfig.batteryHeightLimit.Max) { - fakeValue = standardValue + (CommonUtil.random.NextDouble() - 0.5) * 2.0 * standardGap; + fakeValue = Math.Round((standardValue + (CommonUtil.random.NextDouble() - 0.5) * 2.0 * standardGap), 5); } if (isEnableRawData) -- Gitblit v1.8.0