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.cs26
1 files changed, 13 insertions, 13 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 beba47246..24ad6576d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
@@ -44,7 +44,7 @@ namespace Tango.PPC.UI.Models
{
DryerZone3 = new MachineOverviewItem();
DryerAir = new MachineOverviewItem();
- DryerAir.MaxValue = DryerAirMaxValue;
+ DryerAir.MaxValue = DryerAirMaxValue;
Tunnel = new MachineOverviewItem();
PumpsPressure = new MachineOverviewItem();
PumpsPressure.MaxValue = 6;
@@ -61,7 +61,7 @@ namespace Tango.PPC.UI.Models
//Dryer Air
var dryerAirState = diagnostics.Monitors.EuSpare1.FirstOrDefault();
- UpdateDryerAirItem(dryerAirState);
+ UpdateDryerAirItem(dryerAirState, processParameters != null ? processParameters.ESpare1 : DryerAirMaxValue);
//diagnostics.HeatersStates.FirstOrDefault(x => x.HeaterType == HeaterType.DryerAirHeater);
@@ -96,7 +96,7 @@ namespace Tango.PPC.UI.Models
//Lubricant
var lubricantValue = diagnostics.Monitors.EuLubricantCurrent.FirstOrDefault();
- UpdateLubricantItem( rml, lubricantValue);
+ UpdateLubricantItem(rml, lubricantValue);
}
private void UpdateHeaterItem(MachineOverviewItem item, HeaterState state)
@@ -104,8 +104,8 @@ namespace Tango.PPC.UI.Models
if (state != null)
{
- if (state.IsRampingUp &&
- (state.SetPoint != 0
+ if (state.IsRampingUp &&
+ (state.SetPoint != 0
&& (state.CurrentValue <= (state.SetPoint - 10))))
{
item.Status = "Heating Up";
@@ -121,12 +121,12 @@ namespace Tango.PPC.UI.Models
item.Color = Colors.Green;
item.DisplayValue = $" {state.SetPoint}";
item.DisplayMaxValue = "";
- if(state.SetPoint == 0 && state.CurrentValue == 0)
+ if (state.SetPoint == 0 && state.CurrentValue == 0)
{
item.MaxValue = 10;
}
else
- {
+ {
item.MaxValue = state.SetPoint;
}
item.Value = state.CurrentValue;
@@ -138,7 +138,7 @@ namespace Tango.PPC.UI.Models
item.DisplayValue = $"{state.CurrentValue.ToString("N1")}";
item.DisplayMaxValue = $"/{state.SetPoint}";
item.MaxValue = state.SetPoint;
- item.Value = state.CurrentValue > state.SetPoint? state.SetPoint : state.CurrentValue;
+ item.Value = state.CurrentValue > state.SetPoint ? state.SetPoint : state.CurrentValue;
}
else
{
@@ -150,15 +150,15 @@ namespace Tango.PPC.UI.Models
}
}
- private void UpdateDryerAirItem(double currentvalue)
+ private void UpdateDryerAirItem(double currentvalue, double targetValue)
{
- if (currentvalue < DryerAirMaxValue)
+ if (currentvalue < targetValue)
{
DryerAir.Status = "Heating Up";
DryerAir.Color = Colors.Orange;
DryerAir.DisplayValue = currentvalue.ToString("N1");
}
- else if (currentvalue >= DryerAirMaxValue)
+ else if (currentvalue >= targetValue)
{
DryerAir.Status = "Operational";
DryerAir.Color = Colors.Green;
@@ -189,13 +189,13 @@ namespace Tango.PPC.UI.Models
if (rml != null)
{
var rmlLubrication = Settings.LubricationLevels.FirstOrDefault(x => x.RmlGuid == rml.Guid);
- if (( rml.Lubricant == false)
+ if ((rml.Lubricant == false)
|| (rmlLubrication != null && rmlLubrication.LubricationLevel == Common.Lubrication.LubricationLevel.No))
{
Lubricant.Status = "NotActive";
Lubricant.DisplayValue = "None";
Lubricant.Color = Colors.Gray;
-
+
return;
}
Lubricant.Status = "Active";