diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-06-16 12:30:19 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-06-16 12:30:19 +0300 |
| commit | d363149309bffad946d531db1a1c54a02f5c69bf (patch) | |
| tree | d5ef47ae3844dc1894e56ecca05544a55f487a26 /Software/Visual_Studio/PPC/Tango.PPC.UI | |
| parent | cd9c24c878501f4d2b74facf94c4212886dc4e1e (diff) | |
| download | Tango-d363149309bffad946d531db1a1c54a02f5c69bf.tar.gz Tango-d363149309bffad946d531db1a1c54a02f5c69bf.zip | |
FSE/RSM GetMachines Web Data Resolver.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs | 11 | ||||
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs | 2 |
2 files changed, 9 insertions, 4 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; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs index 0c0497210..1362ac55d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -621,7 +621,7 @@ namespace Tango.PPC.UI.ViewModels private void DefaultDiagnosticsFrameProvider_FrameReceived(object sender, PMR.Diagnostics.StartDiagnosticsResponse e) { - OverviewModel.Update(e, this.Job != null ? Job.Rml : null, MachineProvider.MachineOperator.CurrentProcessParameters); + OverviewModel.Update(e, this.Job != null ? Job.Rml : null, MachineProvider.MachineOperator.CurrentProcessParameters, MachineProvider); } private void MachineOperator_PrintingStarted(object sender, PrintingEventArgs e) |
