aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/MidTankLevelToElementRectConverter.cs
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-05-11 20:23:33 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-05-11 20:23:33 +0300
commitb597a69f85fec4f5b5a1aca65228fc840911d314 (patch)
tree0a4e622292c48e788ce9c008bccaa0834c898db4 /Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/MidTankLevelToElementRectConverter.cs
parent7f3f3d55b9b3dfc66d0bbb2f778298e1e9b224b4 (diff)
downloadTango-b597a69f85fec4f5b5a1aca65228fc840911d314.tar.gz
Tango-b597a69f85fec4f5b5a1aca65228fc840911d314.zip
IMplemented dynamic mid tank capacity on TwineX4 & FSE.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/MidTankLevelToElementRectConverter.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/MidTankLevelToElementRectConverter.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/MidTankLevelToElementRectConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/MidTankLevelToElementRectConverter.cs
index b82ed2b52..2f0e73e2f 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/MidTankLevelToElementRectConverter.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/MidTankLevelToElementRectConverter.cs
@@ -17,9 +17,10 @@ namespace Tango.PPC.UI.Converters
{
double actualHeight = (double)values[0];
double actualWidth = (double)values[1];
- double midTankLevel = Math.Min((double)values[2], MachineOperator.MAX_MIDTANK_LITERS);
+ double maxLiters = (double)values[3];
+ double midTankLevel = Math.Min((double)values[2], maxLiters);
- var offset = (midTankLevel / MachineOperator.MAX_MIDTANK_LITERS) * actualHeight;
+ var offset = (midTankLevel / maxLiters) * actualHeight;
return new System.Windows.Rect(1, offset, actualWidth, actualHeight);
}
catch