aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2023-05-23 10:42:21 +0300
committerRoy <Roy.mail.net@gmail.com>2023-05-23 10:42:21 +0300
commit304735006580cb2f6728bedeb3393dbefc2e14f5 (patch)
tree8650d4baeb0b4db1f68b0fae3a0a8ddb7e66bdc0 /Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
parent79cc4b56962ca4a508be501f7f2fb42938a3a073 (diff)
parentb981d43669a2cdcd9f7971e897ded9f1422f5b31 (diff)
downloadTango-304735006580cb2f6728bedeb3393dbefc2e14f5.tar.gz
Tango-304735006580cb2f6728bedeb3393dbefc2e14f5.zip
Merge branch 'eureka' of https://twinetfs.visualstudio.com/Tango/_git/Tango into eureka
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.cs30
1 files changed, 17 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 d5d8407b7..bd34122c6 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
@@ -14,6 +14,8 @@ namespace Tango.PPC.UI.Models
{
public class MachineOverviewModel : ExtendedObject
{
+ public static double DryerAirMaxValue = 120.0;
+
public MachineOverviewItem DryerZone3 { get; set; }
public MachineOverviewItem DryerAir { get; set; }
public MachineOverviewItem Tunnel { get; set; }
@@ -42,7 +44,7 @@ namespace Tango.PPC.UI.Models
{
DryerZone3 = new MachineOverviewItem();
DryerAir = new MachineOverviewItem();
- DryerAir.MaxValue =140;
+ DryerAir.MaxValue = DryerAirMaxValue;
Tunnel = new MachineOverviewItem();
PumpsPressure = new MachineOverviewItem();
PumpsPressure.MaxValue = 6;
@@ -84,7 +86,9 @@ namespace Tango.PPC.UI.Models
if (state != null)
{
- if (state.IsRampingUp)
+ if (state.IsRampingUp &&
+ (state.SetPoint != 0
+ && (state.CurrentValue <= (state.SetPoint - 10))))
{
item.Status = "Heating Up";
item.Color = Colors.Orange;
@@ -92,15 +96,7 @@ namespace Tango.PPC.UI.Models
item.MaxValue = state.SetPoint;
item.Value = state.CurrentValue;
}
- else if (state.CurrentValue > state.SetPoint)
- {
- item.Status = "Over-temperature";
- item.Color = Colors.Red;
- item.DisplayValue = $"{state.CurrentValue} / {state.SetPoint}";
- item.MaxValue = state.SetPoint;
- item.Value = state.CurrentValue;
- }
- else if (state.IsInSetPoint)
+ else if (state.SetPoint == 0 || (state.CurrentValue >= (state.SetPoint - 10) || state.CurrentValue <= (state.SetPoint + 10)))
{
item.Status = "Operational";
item.Color = Colors.Green;
@@ -108,6 +104,14 @@ namespace Tango.PPC.UI.Models
item.MaxValue = state.SetPoint;
item.Value = state.CurrentValue;
}
+ else if (!state.IsRampingUp && (state.CurrentValue < (state.SetPoint - 10) || state.CurrentValue > (state.SetPoint + 10)))
+ {
+ item.Status = "Over-temperature";
+ item.Color = Colors.Red;
+ item.DisplayValue = $"{state.CurrentValue} / {state.SetPoint}";
+ item.MaxValue = state.SetPoint;
+ item.Value = state.CurrentValue > state.SetPoint? state.SetPoint : state.CurrentValue;
+ }
else
{
item.Color = Colors.Gray;
@@ -119,13 +123,13 @@ namespace Tango.PPC.UI.Models
private void UpdateDryerAirItem(double currentvalue)
{
- if (currentvalue < 140)
+ if (currentvalue < DryerAirMaxValue)
{
DryerAir.Status = "Heating Up";
DryerAir.Color = Colors.Orange;
DryerAir.DisplayValue = $"{currentvalue}";
}
- else if (currentvalue >= 140)
+ else if (currentvalue >= DryerAirMaxValue)
{
DryerAir.Status = "Operational";
DryerAir.Color = Colors.Green;