From edd7e8af06fe0e70e78ce2de9423ec49a799b78a Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Wed, 10 May 2023 14:57:24 +0300 Subject: add values to UI dashboard indicators --- .../PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs new file mode 100644 index 000000000..ded7e33e8 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; +using Tango.Core; + +namespace Tango.PPC.UI.Models +{ + public class MachineOverviewItem : ExtendedObject + { + private String _displayValue; + public String DisplayValue + { + get { return _displayValue; } + set { _displayValue = value; RaisePropertyChangedAuto(); } + } + + private String _status; + public String Status + { + get { return _status; } + set { _status = value; RaisePropertyChangedAuto(); } + } + + private Color _color; + public Color Color + { + get { return _color; } + set { _color = value; RaisePropertyChangedAuto(); } + } + + private double _maxValue; + + public double MaxValue + { + get { return _maxValue; } + set { _maxValue = value; RaisePropertyChangedAuto(); } + } + + private double _value; + + public double Value + { + get { return _value; } + set { _value = value; RaisePropertyChangedAuto(); } + } + + public MachineOverviewItem() + { + Color = Colors.Gray; + DisplayValue = "--"; + Value = 0; + MaxValue = 100; + } + + } +} -- cgit v1.3.1 From 2b1c20945dc03d5136fba48ee9d165b412620e66 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Thu, 8 Jun 2023 09:37:17 +0300 Subject: PPC. Resize the font and change color for Sensors display values. Related Work Items: #8551 --- .../Tango.PPC.JobsV2/Views/JobEurekaView.xaml | 2 +- .../PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs | 8 ++++ .../Tango.PPC.UI/Models/MachineOverviewModel.cs | 12 +++--- .../PPC/Tango.PPC.UI/Views/MachineStatusView.xaml | 48 ++++++++++++---------- .../Tango.Emulations/Emulators/MachineEmulator.cs | 15 +++++++ 5 files changed, 58 insertions(+), 27 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml index c31c8036d..165f251c3 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml @@ -1192,7 +1192,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs index ded7e33e8..42f6bd180 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs @@ -17,6 +17,13 @@ namespace Tango.PPC.UI.Models set { _displayValue = value; RaisePropertyChangedAuto(); } } + private String _displayMaxValue; + public String DisplayMaxValue + { + get { return _displayMaxValue; } + set { _displayMaxValue = value; RaisePropertyChangedAuto(); } + } + private String _status; public String Status { @@ -53,6 +60,7 @@ namespace Tango.PPC.UI.Models DisplayValue = "--"; Value = 0; MaxValue = 100; + DisplayMaxValue = ""; } } 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 faddc5c54..beba47246 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs @@ -110,15 +110,17 @@ namespace Tango.PPC.UI.Models { item.Status = "Heating Up"; item.Color = Colors.Orange; - item.DisplayValue = $"{state.CurrentValue.ToString("N1")} / {state.SetPoint}"; + item.DisplayValue = $"{state.CurrentValue.ToString("N1")}"; + item.DisplayMaxValue = $"/{state.SetPoint}"; item.MaxValue = state.SetPoint; item.Value = state.CurrentValue; } - else if (state.SetPoint == 0 || (state.CurrentValue >= (state.SetPoint - 10) || state.CurrentValue <= (state.SetPoint + 10))) + else if (state.SetPoint == 0 || (state.CurrentValue >= (state.SetPoint - 10) && state.CurrentValue <= (state.SetPoint + 10))) { item.Status = "Operational"; item.Color = Colors.Green; item.DisplayValue = $" {state.SetPoint}"; + item.DisplayMaxValue = ""; if(state.SetPoint == 0 && state.CurrentValue == 0) { item.MaxValue = 10; @@ -133,7 +135,8 @@ namespace Tango.PPC.UI.Models { item.Status = "Over-temperature"; item.Color = Colors.Red; - item.DisplayValue = $"{state.CurrentValue.ToString("N1")} / {state.SetPoint}"; + item.DisplayValue = $"{state.CurrentValue.ToString("N1")}"; + item.DisplayMaxValue = $"/{state.SetPoint}"; item.MaxValue = state.SetPoint; item.Value = state.CurrentValue > state.SetPoint? state.SetPoint : state.CurrentValue; } @@ -142,6 +145,7 @@ namespace Tango.PPC.UI.Models item.Color = Colors.Gray; item.MaxValue = 100; item.Value = 0; + item.DisplayMaxValue = ""; } } } @@ -205,8 +209,6 @@ namespace Tango.PPC.UI.Models Lubricant.DisplayValue = "None"; Lubricant.Color = Colors.Gray; } - - } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml index 536682bf9..1445337ad 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -1021,12 +1021,15 @@ - - - - + + + + + + + - ºC + ºC Dryer Zone 3 @@ -1039,12 +1042,12 @@ - + - + Dryer Air @@ -1056,12 +1059,15 @@ - - - - + + + + + + + - + Tunnel @@ -1073,12 +1079,12 @@ - + - + Pumps pressure @@ -1090,12 +1096,12 @@ - + - + Lubricant @@ -1200,8 +1206,8 @@ - - + + @@ -1244,7 +1250,7 @@ - + @@ -1283,8 +1289,8 @@ - - + + diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs index 5b17ac49d..41884a24c 100644 --- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs +++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs @@ -227,6 +227,21 @@ namespace Tango.Emulations.Emulators HeaterType = (HeaterType)item.Code, }); } + var tunnel = _heater_states.FirstOrDefault(x => x.HeaterType == HeaterType.ETunnelHeater); + if(tunnel != null) + { + tunnel.IsRampingUp = true; + tunnel.CurrentValue = 108.5; + tunnel.SetPoint = 170; + } + var dryerZone3 = _heater_states.FirstOrDefault(x => x.HeaterType == HeaterType.EDryerHeater3); + if (dryerZone3 != null) + { + dryerZone3.IsRampingUp = false; + dryerZone3.CurrentValue = 200.8; + dryerZone3.SetPoint = 170; + } + //DryerZone3 foreach (var item in adapter.HardwareBlowerTypes) { -- cgit v1.3.1