mengshunguo 2 周之前
父節點
當前提交
994488dc89
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      SCADA_DAQ/Customer/Models/ProcessData.cs

+ 1 - 1
SCADA_DAQ/Customer/Models/ProcessData.cs

@@ -105,7 +105,7 @@ namespace SCADA_DAQ.Customer.Models
         {
             Voltage = ((data[startIndex] << 8) + data[startIndex + 1]) / 100.0m;
             Amps = ((data[startIndex + 2] << 8) + data[startIndex + 3]) / 1000.0m;
-            Power = ((data[startIndex + 4] << 8) + data[startIndex + 5]) / 10.0m < 0 ?
+            Power = ((data[startIndex + 4] << 8) + data[startIndex + 5]) / 10.0m <= 1 ?
                 Voltage * Amps : ((data[startIndex + 4] << 8) + data[startIndex + 5]) / 10.0m;
         }