aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Models
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Models')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs8
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs12
2 files changed, 15 insertions, 5 deletions
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;
}
-
-
}
}
}