版本更改
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user