aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
index aaa609c73..43fc7b963 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
@@ -8,6 +8,7 @@ using Tango.BL.Entities;
using Tango.Core;
using Tango.PMR.Diagnostics;
using Tango.PPC.Common;
+using Tango.PPC.Common.Connection;
using Tango.Settings;
namespace Tango.PPC.UI.Models
@@ -22,6 +23,8 @@ namespace Tango.PPC.UI.Models
public MachineOverviewItem PumpsPressure { get; set; }
public MachineOverviewItem Lubricant { get; set; }
+ private IMachineProvider _machineProvider;
+
private PPCSettings _settings;
/// <summary>
/// Gets the main PPC settings.
@@ -53,8 +56,10 @@ namespace Tango.PPC.UI.Models
Lubricant.Value = 100;
}
- public void Update(StartDiagnosticsResponse diagnostics, Rml rml, ProcessParametersTable processParameters)
+ public void Update(StartDiagnosticsResponse diagnostics, Rml rml, ProcessParametersTable processParameters, IMachineProvider machineProvider)
{
+ _machineProvider = machineProvider;
+
//Dryer Zone 3
var dryerZone3State = diagnostics.HeatersStates.FirstOrDefault(x => x.HeaterType == HeaterType.EDryerHeater3);
UpdateHeaterItem(DryerZone3, dryerZone3State);
@@ -152,7 +157,7 @@ namespace Tango.PPC.UI.Models
private void UpdateDryerAirItem(double currentvalue, double targetValue)
{
- if (currentvalue < targetValue)
+ if (_machineProvider.MachineOperator.Status != Integration.Operation.MachineStatuses.ReadyToDye && _machineProvider.MachineOperator.Status != Integration.Operation.MachineStatuses.Printing)
{
DryerAir.Status = "Heating Up";
DryerAir.Color = Colors.Red;
@@ -161,7 +166,7 @@ namespace Tango.PPC.UI.Models
DryerAir.DisplayMaxValue = ((int)targetValue).ToString();
DryerAir.IsReady = false;
}
- else if (currentvalue >= targetValue)
+ else
{
DryerAir.Status = "";
DryerAir.Color = Colors.Green;