diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-05-15 22:05:35 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-05-15 22:05:35 +0300 |
| commit | fd061c7cb7f243d562913d496223830bcf83b7a9 (patch) | |
| tree | 06d00b6b9cfec13c7021e907a4b567b45da09c8f /Software/Visual_Studio/PPC/Tango.PPC.UI/Models | |
| parent | 700a9ea9e2c9d95f0c5739c58974eafaff2ebeb9 (diff) | |
| download | Tango-fd061c7cb7f243d562913d496223830bcf83b7a9.tar.gz Tango-fd061c7cb7f243d562913d496223830bcf83b7a9.zip | |
Dryer Target Value, Firmware Version Descriptors fixes.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Models')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs | 26 |
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"; |
