aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy.mail.net@gmail.com>2023-07-16 12:09:56 +0300
committerRoy Ben-Shabat <Roy.mail.net@gmail.com>2023-07-16 12:09:56 +0300
commitac39b49638cb1b2f3602f51c7f5a1cde7e0df673 (patch)
treed3c6cdf0fa913cc07cbfc8c9cf8c065d1bce0dae /Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs
parent48fe4a21077ae4ec4b78e1b3fd76934a20b58dda (diff)
parenta353bf2a5fae2eb8d81c342a5c5dce0e3de2b086 (diff)
downloadTango-ac39b49638cb1b2f3602f51c7f5a1cde7e0df673.tar.gz
Tango-ac39b49638cb1b2f3602f51c7f5a1cde7e0df673.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.cs12
1 files changed, 7 insertions, 5 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 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;
}
-
-
}
}
}