版本更改

This commit is contained in:
2026-03-26 17:47:56 +08:00
parent 6876872145
commit d7dfe27ad5
6 changed files with 29 additions and 6 deletions

View File

@@ -24,6 +24,7 @@ namespace CapMachine.Wpf.Services
/// 计算扫描 Task
/// </summary>
private static Task CalcTask { get; set; }
private static int _scanLoopStarted;
public ConfigService ConfigService { get; }
private IEventAggregator _EventAggregator { get; set; }
@@ -266,6 +267,11 @@ namespace CapMachine.Wpf.Services
/// </summary>
private void RtScanDeviceStart()
{
if (System.Threading.Interlocked.CompareExchange(ref _scanLoopStarted, 1, 0) != 0)
{
return;
}
CalcTask = Task.Run(async () =>
{
while (RtCalcEnable)
@@ -332,7 +338,7 @@ namespace CapMachine.Wpf.Services
}
else if (_superheatSubcoolCalculator.TryCalculateSuperheatK(InhPressTag.EngPvValue, InhTempTag.EngPvValue, out var superheatValue, out var superheatErr))
{
Superheat.EngPvValue = superheatValue;
Superheat.EngPvValue =Math.Abs(superheatValue) ;
updated = true;
}
else
@@ -348,7 +354,7 @@ namespace CapMachine.Wpf.Services
}
else if (_superheatSubcoolCalculator.TryCalculateSubcoolK(TxvFrPressTag.EngPvValue, TxvFrTempTag.EngPvValue, out var subcoolValue, out var subcoolErr))
{
Subcool.EngPvValue = subcoolValue;
Subcool.EngPvValue = Math.Abs(subcoolValue);
updated = true;
}
else