diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-05-11 20:23:33 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-05-11 20:23:33 +0300 |
| commit | b597a69f85fec4f5b5a1aca65228fc840911d314 (patch) | |
| tree | 0a4e622292c48e788ce9c008bccaa0834c898db4 /Software/Visual_Studio/FSE | |
| parent | 7f3f3d55b9b3dfc66d0bbb2f778298e1e9b224b4 (diff) | |
| download | Tango-b597a69f85fec4f5b5a1aca65228fc840911d314.tar.gz Tango-b597a69f85fec4f5b5a1aca65228fc840911d314.zip | |
IMplemented dynamic mid tank capacity on TwineX4 & FSE.
Diffstat (limited to 'Software/Visual_Studio/FSE')
3 files changed, 5 insertions, 4 deletions
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Converters/MidTankLevelToElementHeightConverter.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Converters/MidTankLevelToElementHeightConverter.cs index 88a90484d..f96725816 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Converters/MidTankLevelToElementHeightConverter.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Converters/MidTankLevelToElementHeightConverter.cs @@ -16,9 +16,9 @@ namespace Tango.FSE.UI.Converters try { double parentActualHeight = (double)values[0]; - double midTankLevel = Math.Min((double)values[1], MachineOperator.MAX_MIDTANK_LITERS); - //var test = (parentActualHeight - (midTankLevel / MachineOperator.MAX_MIDTANK_LITERS) * parentActualHeight); - return (parentActualHeight - (midTankLevel / MachineOperator.MAX_MIDTANK_LITERS) * parentActualHeight); + double max = (double)values[2]; + double midTankLevel = Math.Min((double)values[1], max); + return (parentActualHeight - (midTankLevel / max) * parentActualHeight); } catch { diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTile.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTile.cs index d8165d8aa..730055872 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTile.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTile.cs @@ -142,7 +142,7 @@ namespace Tango.FSE.UI.Tiles.MidTankLevels { MidTankLevels = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.Where(x => x.MidTankType.HasLevelMeasure).OrderBy(x => x.PackIndex).Select(x => new MidTankLevelModel() { - Max = MachineOperator.MAX_MIDTANK_LITERS, + Max = x.MidTankType.LiterCapacity, IDSPack = x, }).ToList(); } diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTileView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTileView.xaml index 7465f41c0..5e4f8ed9a 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTileView.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTileView.xaml @@ -58,6 +58,7 @@ <MultiBinding Converter="{StaticResource MidTankLevelToElementHeightConverter}"> <Binding ElementName="pathBorder" Path="ActualHeight" /> <Binding Path="Level" /> + <Binding Path="Max" /> </MultiBinding> </Setter.Value> </Setter> |
