aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben Shabat <roy.mail.net@gmail.com>2025-09-09 11:37:36 +0300
committerRoy Ben Shabat <roy.mail.net@gmail.com>2025-09-09 11:37:36 +0300
commitd7080c93350b96e49d80450d5e1a76fd6f3ad64e (patch)
treec9816297851bc5d0a04cfba4abb16fabef05bbce /Software/Visual_Studio
parent1cbef6c4d79a1db8c8d3923edfec2e50277caa51 (diff)
downloadTango-d7080c93350b96e49d80450d5e1a76fd6f3ad64e.tar.gz
Tango-d7080c93350b96e49d80450d5e1a76fd6f3ad64e.zip
New Extra Inks and Default LiquidTypesRml * DefaultFactor Handling.
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs59
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml4
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml2
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Configuration.cs3
-rw-r--r--Software/Visual_Studio/Tango.BL/LiquidVolume.cs19
-rw-r--r--Software/Visual_Studio/Tango.ColorConversion/DefaultColorConverter.cs36
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs26
-rw-r--r--Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Eureka BB alarm events handling chart_TS_and_X4_Rev28.xlsxbin0 -> 116443 bytes
-rw-r--r--Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Program.cs2
-rw-r--r--Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Tango.EventsTypesGenerator.csproj3
11 files changed, 103 insertions, 53 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
index 5d9325145..a1cda2249 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
@@ -795,7 +795,7 @@
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="60 25 350 0" Visibility="{Binding IsSideBarOpened,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
<materialDesign:PackIcon Kind="ChevronLeft" Width="24" Height="24" />
- <TextBlock Margin="0 -2 0 0" VerticalAlignment="Center"><Run>MEDIA LIQUIDS</Run> <Run FontSize="10" Foreground="{StaticResource DimGrayBrush}">( Max Nanolitter/CM )</Run></TextBlock>
+ <TextBlock Margin="0 -2 0 0" VerticalAlignment="Center"><Run>MEDIA LIQUIDS</Run> <Run FontSize="10" Foreground="{StaticResource DimGrayBrush}">( Max Nanolitter/CM )</Run> | <Run Text="{Binding SelectedRML.DefaultLiquidFactor}"></Run> nl</TextBlock>
<materialDesign:PackIcon Kind="ChevronRight" Width="24" Height="24" />
</StackPanel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
index c0318e17b..1da3723d1 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
@@ -498,21 +498,21 @@ namespace Tango.MachineStudio.RML.ViewModels
CCTS.Where(x => String.IsNullOrWhiteSpace(x.FileName)).ToList().ForEach(x => x.FileName = x.Guid);
- GBDS = _active_context.Gbds
- .Select(x => new DataFileModel()
- {
- Guid = x.Guid,
- FileName = x.FileName,
+ //GBDS = _active_context.Gbds
+ // .Select(x => new DataFileModel()
+ // {
+ // Guid = x.Guid,
+ // FileName = x.FileName,
- }).ToObservableCollection();
+ // }).ToObservableCollection();
- LUBS = _active_context.Lubs
- .Select(x => new DataFileModel()
- {
- Guid = x.Guid,
- FileName = x.FileName,
+ //LUBS = _active_context.Lubs
+ // .Select(x => new DataFileModel()
+ // {
+ // Guid = x.Guid,
+ // FileName = x.FileName,
- }).ToObservableCollection();
+ // }).ToObservableCollection();
LoadRmlProperties();
@@ -603,25 +603,25 @@ namespace Tango.MachineStudio.RML.ViewModels
RaisePropertyChanged(nameof(SelectedCCT));
}
- if (ActiveRML.Gbd != null)
- {
- _selectedGBD = GBDS.SingleOrDefault(x => x.Guid == ActiveRML.Gbd.Guid);
- await OnSelectedGBDChanged();
- RaisePropertyChanged(nameof(SelectedGBD));
- }
+ //if (ActiveRML.Gbd != null)
+ //{
+ // _selectedGBD = GBDS.SingleOrDefault(x => x.Guid == ActiveRML.Gbd.Guid);
+ // await OnSelectedGBDChanged();
+ // RaisePropertyChanged(nameof(SelectedGBD));
+ //}
- if (ActiveRML.Lub != null)
- {
- _selectedLUB = LUBS.SingleOrDefault(x => x.Guid == ActiveRML.Lub.Guid);
- await OnSelectedLUBChanged();
- RaisePropertyChanged(nameof(SelectedLUB));
- }
+ //if (ActiveRML.Lub != null)
+ //{
+ // _selectedLUB = LUBS.SingleOrDefault(x => x.Guid == ActiveRML.Lub.Guid);
+ // await OnSelectedLUBChanged();
+ // RaisePropertyChanged(nameof(SelectedLUB));
+ //}
- ColorCalibrationVM = new ColorCalibrationViewVM(_notification)
- {
- RML = ActiveRML,
- LiquidTypes = LiquidTypesRmls.Where(x => x.LiquidType.HasPigment).ToList().Select(y => y.LiquidType).ToList(),
- };
+ //ColorCalibrationVM = new ColorCalibrationViewVM(_notification)
+ //{
+ // RML = ActiveRML,
+ // LiquidTypes = LiquidTypesRmls.Where(x => x.LiquidType.HasPigment).ToList().Select(y => y.LiquidType).ToList(),
+ //};
_rmlBeforeSave = RmlDTO.FromObservable(ActiveRML);
@@ -1019,6 +1019,7 @@ namespace Tango.MachineStudio.RML.ViewModels
{
LiquidType = vm.SelectedLiquidType,
Rml = ActiveRML,
+ MaxNlPerCm = ActiveRML.DefaultLiquidFactor,
};
_active_context.LiquidTypesRmls.Add(liquidFactor);
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
index acd83cee2..7f6ebcbb6 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
@@ -319,9 +319,9 @@
<TabItem Header="BTSR" Margin="-100 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20">
<local:BTSRView HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"/>
</TabItem>
- <TabItem Header="COLOR CALIBRATION" Margin="-100 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20">
+ <!--<TabItem Header="COLOR CALIBRATION" Margin="-100 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20">
<local:ColorCalibrationView DataContext="{Binding ColorCalibrationVM}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"/>
- </TabItem>
+ </TabItem>-->
</TabControl>
</Grid>
<Grid Grid.Row="1">
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml
index 85d35cf4f..bda4d7a29 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml
@@ -478,7 +478,7 @@
</DockPanel>
<TextBlock HorizontalAlignment="Center" >RGB</TextBlock>
- <TextBlock HorizontalAlignment="Center" >CMYK</TextBlock>
+ <TextBlock HorizontalAlignment="Center" >Volume</TextBlock>
<TextBlock HorizontalAlignment="Center" >Catalogs</TextBlock>
<touch:TouchNavigationLinks.Style>
<Style TargetType="{x:Type touch:TouchNavigationLinks}">
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs b/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs
index 2e1ceba67..62c20bcce 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Configuration.cs
@@ -45,7 +45,8 @@ namespace Tango.BL.Entities
throw new NullReferenceException("The specified RML cannot be null.");
}
- return NoneEmptyIdsPacks.Where(x => rml.LiquidTypesRmls.ToList().Exists(y => x.LiquidType != null && y.LiquidType.Guid == x.LiquidType.Guid)).OrderBy(x => x.PackIndex).ToList();
+ //return NoneEmptyIdsPacks.Where(x => rml.LiquidTypesRmls.ToList().Exists(y => x.LiquidType != null && y.LiquidType.Guid == x.LiquidType.Guid)).OrderBy(x => x.PackIndex).ToList();
+ return NoneEmptyIdsPacks.OrderBy(x => x.PackIndex).ToList();
}
/// <summary>
diff --git a/Software/Visual_Studio/Tango.BL/LiquidVolume.cs b/Software/Visual_Studio/Tango.BL/LiquidVolume.cs
index 5b4cec488..4949378e9 100644
--- a/Software/Visual_Studio/Tango.BL/LiquidVolume.cs
+++ b/Software/Visual_Studio/Tango.BL/LiquidVolume.cs
@@ -140,16 +140,27 @@ namespace Tango.BL
{
List<LiquidTypesRml> factors = Configuration.GetSupportedIdsPacks(RML).Select(x => x.LiquidType).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == RML.Guid).ToList();
- int index = BrushStop.LiquidVolumes.IndexOf(this);
+ var factor = factors.FirstOrDefault(x => x.LiquidType != null && x.LiquidType.Type == LiquidType);
- if (index > factors.Count - 1 || index < 0)
+ if (factor != null)
{
- return 0d;
+ return factor.MaxNlPerCm;
}
else
{
- return factors[index].MaxNlPerCm;
+ return RML.DefaultLiquidFactor;
}
+
+ //int index = BrushStop.LiquidVolumes.IndexOf(this);
+
+ //if (index > factors.Count - 1 || index < 0)
+ //{
+ // return RML.DefaultLiquidFactor;
+ //}
+ //else
+ //{
+ // return factors[index].MaxNlPerCm;
+ //}
}
else
{
diff --git a/Software/Visual_Studio/Tango.ColorConversion/DefaultColorConverter.cs b/Software/Visual_Studio/Tango.ColorConversion/DefaultColorConverter.cs
index 9c92fac36..548b333c5 100644
--- a/Software/Visual_Studio/Tango.ColorConversion/DefaultColorConverter.cs
+++ b/Software/Visual_Studio/Tango.ColorConversion/DefaultColorConverter.cs
@@ -526,10 +526,17 @@ namespace Tango.ColorConversion
volume = 0;
}
+ var liquidFactor = rml.DefaultLiquidFactor;
+ var liquidTypeRML = ids_pack.LiquidType.LiquidTypesRmls.FirstOrDefault(x => x.Rml == rml);
+ if (liquidTypeRML != null)
+ {
+ liquidFactor = liquidTypeRML.MaxNlPerCm;
+ }
+
conversionInput.InputCoordinates.InputLiquids.Add(new InputLiquid()
{
LiquidType = (PMR.ColorLab.LiquidType)ids_pack.LiquidType.Code,
- MaxNanoliterPerCentimeter = ids_pack.LiquidType.LiquidTypesRmls.Single(x => x.Rml == rml).MaxNlPerCm,
+ MaxNanoliterPerCentimeter = liquidFactor,
Volume = volume,
CalibrationData = calibrationData,
IsExtraInk = ids_pack.LiquidType.IsExtraInk,
@@ -736,10 +743,17 @@ namespace Tango.ColorConversion
}
}
+ var liquidFactor = rml.DefaultLiquidFactor;
+ var liquidTypeRML = ids_pack.LiquidType.LiquidTypesRmls.FirstOrDefault(x => x.Rml == rml);
+ if (liquidTypeRML != null)
+ {
+ liquidFactor = liquidTypeRML.MaxNlPerCm;
+ }
+
input.InputCoordinates.InputLiquids.Add(new InputLiquid()
{
LiquidType = (PMR.ColorLab.LiquidType)ids_pack.LiquidType.Code,
- MaxNanoliterPerCentimeter = ids_pack.LiquidType.LiquidTypesRmls.Single(x => x.Rml == rml).MaxNlPerCm,
+ MaxNanoliterPerCentimeter = liquidFactor,
Volume = stop.GetVolume(ids_pack.PackIndex),
CalibrationData = calibrationData,
});
@@ -926,10 +940,17 @@ namespace Tango.ColorConversion
}
}
+ var liquidFactor = rml.DefaultLiquidFactor;
+ var liquidTypeRML = ids_pack.LiquidType.LiquidTypesRmls.FirstOrDefault(x => x.Rml == rml);
+ if (liquidTypeRML != null)
+ {
+ liquidFactor = liquidTypeRML.MaxNlPerCm;
+ }
+
input.InputLiquids.Add(new InputLiquid()
{
LiquidType = (PMR.ColorLab.LiquidType)ids_pack.LiquidType.Code,
- MaxNanoliterPerCentimeter = ids_pack.LiquidType.LiquidTypesRmls.Single(x => x.Rml == rml).MaxNlPerCm,
+ MaxNanoliterPerCentimeter = liquidFactor,
CalibrationData = calibrationData,
Color = ids_pack.LiquidType.Color,
IsExtraInk = ids_pack.LiquidType.IsExtraInk,
@@ -1200,10 +1221,17 @@ namespace Tango.ColorConversion
}
//}
+ var liquidFactor = rml.DefaultLiquidFactor;
+ var liquidTypeRML = ids_pack.LiquidType.LiquidTypesRmls.FirstOrDefault(x => x.Rml == rml);
+ if (liquidTypeRML != null)
+ {
+ liquidFactor = liquidTypeRML.MaxNlPerCm;
+ }
+
conversionInput.InputLiquids.Add(new InputLiquid()
{
LiquidType = (PMR.ColorLab.LiquidType)ids_pack.LiquidType.Code,
- MaxNanoliterPerCentimeter = ids_pack.LiquidType.LiquidTypesRmls.Single(x => x.Rml == rml).MaxNlPerCm,
+ MaxNanoliterPerCentimeter = liquidFactor,
CalibrationData = calibrationData,
});
}
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
index de9168cac..123f72e67 100644
--- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
+++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -91,6 +91,7 @@ namespace Tango.Emulations.Emulators
private MachineType _machineType;
private ProcessParameters _processParameters;
private bool _failJob;
+ private HardwareConfiguration _hardwareConfiguration;
#region Properties
@@ -164,15 +165,6 @@ namespace Tango.Emulations.Emulators
MachineStatus.SpoolState = SpoolState.Present;
MachineStatus.State = MachineState.Ready;
- for (int i = 0; i < 10; i++)
- {
- MachineStatus.IDSPacksLevels.Add(new IDSPackLevel()
- {
- Index = i,
- DispenserLevel = 130000000,
- MidTankLevel = 2.5,
- });
- }
for (int i = 0; i < 4; i++)
{
if (i == 2)
@@ -784,7 +776,7 @@ namespace Tango.Emulations.Emulators
res.Status = MachineStatus;
res.Status.OverallTemperature = Cursor.Position.Y;
- if (!EmulateCorruption)
+ if (!EmulateCorruption && _hardwareConfiguration != null)
{
Transporter.SendResponse<StartMachineStatusUpdateResponse>(res, request.Container.Token);
}
@@ -1427,6 +1419,20 @@ namespace Tango.Emulations.Emulators
private void HandleUploadHardwareConfigurationRequest(TangoMessage<UploadHardwareConfigurationRequest> request)
{
+ _hardwareConfiguration = request.Message.HardwareConfiguration;
+
+ int dispenserCount = _hardwareConfiguration != null ? _hardwareConfiguration.Dispensers.Count : 10;
+
+ for (int i = 0; i < dispenserCount; i++)
+ {
+ MachineStatus.IDSPacksLevels.Add(new IDSPackLevel()
+ {
+ Index = i,
+ DispenserLevel = 130000000,
+ MidTankLevel = 2.5,
+ });
+ }
+
Transporter.SendResponse<UploadHardwareConfigurationResponse>(new UploadHardwareConfigurationResponse(), request.Container.Token);
}
diff --git a/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Eureka BB alarm events handling chart_TS_and_X4_Rev28.xlsx b/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Eureka BB alarm events handling chart_TS_and_X4_Rev28.xlsx
new file mode 100644
index 000000000..37acb3cfa
--- /dev/null
+++ b/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Eureka BB alarm events handling chart_TS_and_X4_Rev28.xlsx
Binary files differ
diff --git a/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Program.cs b/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Program.cs
index fe00eb18e..e05f3dc13 100644
--- a/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Program.cs
+++ b/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Program.cs
@@ -16,7 +16,7 @@ namespace Tango.EventsTypesGenerator
{
class Program
{
- private static string EVENTS_FILE = "Eureka BB alarm events handling chart_TS_and_X4_Rev27.xlsx";
+ private static string EVENTS_FILE = "Eureka BB alarm events handling chart_TS_and_X4_Rev28.xlsx";
private class ExcelEventType
{
diff --git a/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Tango.EventsTypesGenerator.csproj b/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Tango.EventsTypesGenerator.csproj
index a7f7327ad..c812d5ff4 100644
--- a/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Tango.EventsTypesGenerator.csproj
+++ b/Software/Visual_Studio/Utilities/Tango.EventsTypesGenerator/Tango.EventsTypesGenerator.csproj
@@ -97,6 +97,9 @@
<None Include="Eureka BB alarm events handling chart_TS_and_X4_Rev27.xlsx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
+ <None Include="Eureka BB alarm events handling chart_TS_and_X4_Rev28.xlsx">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
<None Include="Eureka BB alarm events handling chart_TS_and_X4_Rev4.xlsx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>