Browse Source

1. before_ai中增加 "uint32_t HOURS_FORM_LAST_1278; //当前时间 离上一次1278结果的 间隔小时数"

djs 4 tháng trước cách đây
mục cha
commit
dce684c1e5

+ 7 - 1
MeterVision/FreeAi/FaBefore.cs

@@ -61,6 +61,7 @@ namespace MeterVision.FreeAi
             beforeAI.UNIT_OF_THE_LAST_NUMBER = (uint)FaConstant.IMPOSSIBLE_VALUE;
             beforeAI.NUM_INDICATORS = FaConstant.IMPOSSIBLE_NUM_NUMBER;
             beforeAI.UNIT_OF_THE_LAST_INDICATOR = (uint)FaConstant.IMPOSSIBLE_VALUE;
+            beforeAI.HOURS_FORM_LAST_1278 = 0;  //20250402
             beforeAI.MAX_FLOW_THRESHOLD = FaConstant.IMPOSSIBLE_MAX_VALUE;
             beforeAI.AI_RESULT = FaConstant.IMPOSSIBLE_MAX_VALUE;
             beforeAI.AI_COMPLETE_RESULT = FaConstant.IMPOSSIBLE_MAX_VALUE;
@@ -114,7 +115,8 @@ namespace MeterVision.FreeAi
                 TryParseCoordinates(detailItem.MeterRegion, 2, ref beforeAI.CONFIG_METER_REGION);
 
                 //单张图计算最大流量,意义不大,也不太好确定时间,就按1小时计算吧
-                beforeAI.MAX_FLOW_THRESHOLD = (ulong)detailItem.FlowRate * FaConstant.CUBE_VALUE;
+                beforeAI.HOURS_FORM_LAST_1278 = 1;
+                beforeAI.MAX_FLOW_THRESHOLD = (ulong)detailItem.FlowRate * FaConstant.CUBE_VALUE;                
                 beforeAI.AI_RESULT = (ulong)detailItem.LastValue * FaConstant.CUBE_VALUE;
             }
             beforeAI.BRIGHT_FACTOR = (float)detailItem.BrightVal;
@@ -154,6 +156,7 @@ namespace MeterVision.FreeAi
 
                 //单张图计算最大流量,意义不大,也不太好确定时间,就按1小时计算吧
                 double hourDiffs = CalculateHourDifference(detailItem.LatestTime, detailItem.SampleTime);
+                beforeAI.HOURS_FORM_LAST_1278 = (uint)hourDiffs;
                 beforeAI.MAX_FLOW_THRESHOLD = (ulong)(detailItem.FlowRate * hourDiffs * FaConstant.CUBE_VALUE);
                 //上次的值
                 beforeAI.AI_RESULT = (ulong)detailItem.LatestValue;  // * FaConstant.CUBE_VALUE;               
@@ -173,6 +176,7 @@ namespace MeterVision.FreeAi
 
             if(beforeAI.MAX_FLOW_THRESHOLD == 0)
             {
+                beforeAI.HOURS_FORM_LAST_1278 = 1;
                 beforeAI.MAX_FLOW_THRESHOLD = (ulong)(detailItem.FlowRate * 1 * FaConstant.CUBE_VALUE);
             }
 
@@ -207,6 +211,7 @@ namespace MeterVision.FreeAi
                 TryParseCoordinates(detailItem.MeterRegion, 2, ref beforeAI.CONFIG_METER_REGION);
 
                 double hourDiffs = CalculateHourDifference(detailItem.LatestTime, detailItem.SampleTime);
+                beforeAI.HOURS_FORM_LAST_1278 = (uint)hourDiffs;
                 beforeAI.MAX_FLOW_THRESHOLD = (ulong)(detailItem.FlowRate * hourDiffs * FaConstant.CUBE_VALUE);
                 //上次的值
                 beforeAI.AI_RESULT = (ulong)detailItem.LatestValue;  // * FaConstant.CUBE_VALUE;               
@@ -225,6 +230,7 @@ namespace MeterVision.FreeAi
 
             if (beforeAI.MAX_FLOW_THRESHOLD == 0)
             {
+                beforeAI.HOURS_FORM_LAST_1278 = 1;
                 beforeAI.MAX_FLOW_THRESHOLD = (ulong)(detailItem.FlowRate * 1 * FaConstant.CUBE_VALUE);
             }
 

+ 2 - 0
MeterVision/FreeAi/FaImport.cs

@@ -22,6 +22,8 @@ namespace MeterVision.FreeAi
             public byte NUM_INDICATORS;       // uint8_t 对应 byte
             //05 指针的尾数单位
             public uint UNIT_OF_THE_LAST_INDICATOR; // uint32_t 对应 uint
+            
+            public uint HOURS_FORM_LAST_1278; //当前时间 离上一次1278结果的 间隔小时数
 
             //06 当前时间距离上次准确识别时间内的最大流量,最小单位0.1L(1m³/10000), (万分之一立方)
             public ulong MAX_FLOW_THRESHOLD;  // uint64_t 对应 ulong           

+ 1 - 1
MeterVision/MainWindow.xaml

@@ -11,7 +11,7 @@
         AllowDrop="False"
         PreviewMouseDown="Window_PreviewMouseDown"
         PreviewKeyDown="Window_PreviewKeyDown"
-        Title="读表器AI模型测试验证工具" Height="768" Width="1366">
+        Title="读表器AI模型测试验证工具-需配置版" Height="768" Width="1366">
     <Window.Resources>
     </Window.Resources>
     <Grid>

+ 2 - 2
MeterVision/Properties/AssemblyInfo.cs

@@ -51,5 +51,5 @@ using System.Windows;
 // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
 // 方法是按如下所示使用“*”: :
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.3.0.0")]
-[assembly: AssemblyFileVersion("2.3.0.0")]
+[assembly: AssemblyVersion("2.3.1.0")]
+[assembly: AssemblyFileVersion("2.3.1.0")]