Merge branch 'feature/IntegrityCheckField' into develop

# Conflicts:
#	Libs/CMS_CORE_Library.dll
#	Step.NC/SiemensToolTableAdapter.cs
This commit is contained in:
Lucio Maranta
2019-12-11 15:06:11 +01:00
10 changed files with 42 additions and 22 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
<RenderingMethod>GPU</RenderingMethod> <!-- GPU/CPU -->
<ShowVirtualKeyboard>false</ShowVirtualKeyboard>
<RunningOnSecondaryScreen>false</RunningOnSecondaryScreen>
<DeveloperMode>true</DeveloperMode>
<DeveloperMode>false</DeveloperMode>
</Client>
<Connection>
<ServerUrl>localhost</ServerUrl>
Binary file not shown.
+1 -1
View File
@@ -10,7 +10,7 @@
<sharedName>//PARTPRG:/</sharedName>
<installationDate>01/01/2019</installationDate>
<mgiOption>false</mgiOption>
<siemensKeyboardOption>true</siemensKeyboardOption>
<siemensKeyboardOption>false</siemensKeyboardOption>
</ncConfig>
<softwareProdConfig>
<enabled>false</enabled>
+1
View File
@@ -15,6 +15,7 @@
<selfAdaptivePathOpt>true</selfAdaptivePathOpt>
<dynamicCompensationOpt>true</dynamicCompensationOpt>
<ballufOpt>true</ballufOpt>
<integrityCheckOpt>true</integrityCheckOpt>
</toolManagerConfig>
<coolingLocalizedNames>
<cooling>
@@ -20,6 +20,7 @@
<xs:element name="selfAdaptivePathOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
<xs:element name="dynamicCompensationOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
<xs:element name="ballufOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
<xs:element name="integrityCheckOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
</xs:all>
</xs:complexType>
</xs:element>
+2 -1
View File
@@ -607,7 +607,8 @@ namespace Step.Config
MultidimensionalShankOpt = Convert.ToBoolean(x.Element("multidimensionalShankOpt").Value),
SelfAdaptivePathOpt = Convert.ToBoolean(x.Element("selfAdaptivePathOpt").Value),
DynamicCompensationOpt = Convert.ToBoolean(x.Element("dynamicCompensationOpt").Value),
BallufOpt = Convert.ToBoolean(x.Element("ballufOpt").Value)
BallufOpt = Convert.ToBoolean(x.Element("ballufOpt").Value),
IntegrityCheckOpt = Convert.ToBoolean(x.Element("integrityCheckOpt").Value)
})
.FirstOrDefault();
@@ -23,6 +23,7 @@ namespace Step.Model.ConfigModels
public bool SelfAdaptivePathOpt { get; set; }
public bool DynamicCompensationOpt { get; set; }
public bool BallufOpt { get; set; }
public bool IntegrityCheckOpt { get; set; }
public CooligTranslations CooligsTranslations { get; set; }
@@ -30,6 +30,9 @@ namespace Step.Model.DTOModels.ToolModels
[Required]
public bool Measured { get; set; }
[Required]
public bool IntegrityCheck { get; set; }
[Required]
public bool ClockwiseRotation { get; set; }
@@ -55,15 +58,16 @@ namespace Step.Model.DTOModels.ToolModels
Disabled = bits[0],
Broken = bits[1],
Measured = bits[2],
ClockwiseRotation = bits[3],
CounterClockwiseRotation = bits[4],
IntegrityCheck = bits[3],
ClockwiseRotation = bits[4],
CounterClockwiseRotation = bits[5],
};
}
public static explicit operator DbNcToolModel(DTONcTool obj)
{
// Prepare status byte
bool[] result = new bool[8] { obj.Disabled, obj.Broken, obj.Measured, obj.ClockwiseRotation, obj.CounterClockwiseRotation, false, false, false };
bool[] result = new bool[8] { obj.Disabled, obj.Broken, obj.Measured, obj.IntegrityCheck, obj.ClockwiseRotation, obj.CounterClockwiseRotation, false, false };
byte status = ConvertArrayToByte(result);
return new DbNcToolModel()
@@ -116,8 +120,9 @@ namespace Step.Model.DTOModels.ToolModels
Disabled = bits[0],
Broken = bits[1],
Measured = bits[2],
ClockwiseRotation = bits[3],
CounterClockwiseRotation = bits[4],
IntegrityCheck = bits[3],
ClockwiseRotation = bits[4],
CounterClockwiseRotation = bits[5],
OffsetId1 = obj.OffsetId1,
OffsetId2 = obj.OffsetId2,
OffsetId3 = obj.OffsetId3
@@ -127,7 +132,7 @@ namespace Step.Model.DTOModels.ToolModels
public static explicit operator DbNcToolModel(DTONcToolModel obj)
{
// Prepare status byte
bool[] result = new bool[8] { obj.Disabled, obj.Broken, obj.Measured, obj.ClockwiseRotation, obj.CounterClockwiseRotation, false, false, false };
bool[] result = new bool[8] { obj.Disabled, obj.Broken, obj.Measured, obj.IntegrityCheck, obj.ClockwiseRotation, obj.CounterClockwiseRotation, false, false };
byte status = ConvertArrayToByte(result);
return new DbNcToolModel()
@@ -172,8 +177,9 @@ namespace Step.Model.DTOModels.ToolModels
Disabled = bits[0],
Broken = bits[1],
Measured = bits[2],
ClockwiseRotation = bits[3],
CounterClockwiseRotation = bits[4],
IntegrityCheck = bits[3],
ClockwiseRotation = bits[4],
CounterClockwiseRotation = bits[5],
OffsetId1 = obj.OffsetId1,
OffsetId2 = obj.OffsetId2,
OffsetId3 = obj.OffsetId3
@@ -183,7 +189,7 @@ namespace Step.Model.DTOModels.ToolModels
public static explicit operator DbNcToolModel(DTONewNcToolModel obj)
{
// Prepare status byte
bool[] result = new bool[8] { obj.Disabled, obj.Broken, obj.Measured, obj.ClockwiseRotation, obj.CounterClockwiseRotation, false, false, false};
bool[] result = new bool[8] { obj.Disabled, obj.Broken, obj.Measured, obj.IntegrityCheck, obj.ClockwiseRotation, obj.CounterClockwiseRotation, false, false};
byte status = ConvertArrayToByte(result);
return new DbNcToolModel()
+19 -9
View File
@@ -29,12 +29,7 @@ namespace Step.NC
config.SelfAdaptivePathOptionActive = true;
if (!ToolManagerConfig.SelfAdaptivePathOpt)
config.SelfAdaptivePathOptionActive = false;
// Update Tool types list
config.ToolsConfiguration.Where(x => x.Name == "toolTypeCode").FirstOrDefault().SelectValues = ToolManagerConfig
.ToolTypes.Where(x => !x.Disabled)
.ToDictionary(x => x.Id, x => x.Id.ToString());
if (NcConfig.NcVendor != NC_VENDOR.SIEMENS && NcConfig.NcVendor != NC_VENDOR.DEMO)
{
// Setup options
@@ -101,17 +96,32 @@ namespace Step.NC
if (!ToolManagerConfig.ReviveOpt)
categories.Add("revive");
if (!ToolManagerConfig.IntegrityCheckOpt)
categories.Add("integrityCheck");
// Remove category from configurations
config.ToolsConfiguration = config.ToolsConfiguration.Where(x => !categories.Contains(x.Category)).ToList();
config.ToolsConfiguration = config.ToolsConfiguration.Where(x => !categories.Contains(x.Category) && !categories.Contains(x.SubCategory)).ToList();
// Remove categories from familyConfig
config.FamiliesConfiguration.FamilyConfiguration = config.FamiliesConfiguration.FamilyConfiguration.Where(x => !categories.Contains(x.Category)).ToList();
// Filter by SUBCATEGORIES because "ReadOnlyFamily" categories are not populated
// Remove also SUBCATEGORIES because "ReadOnlyFamily" configuration has category field not populated
config.FamiliesConfiguration.FamilyReadOnlyConfiguration = config.FamiliesConfiguration.FamilyReadOnlyConfiguration.Where(x => !categories.Contains(x.SubCategory)).ToList();
config.ShanksConfiguration.ShankConfiguration = config.ShanksConfiguration.ShankConfiguration.Where(x => !categories.Contains(x.Category)).ToList();
config.MagazinePosConfiguration = config.MagazinePosConfiguration.Where(x => !categories.Contains(x.Category)).ToList();
// Update tool types list
config.FamiliesConfiguration.FamilyConfiguration.Where(x => x.Name == "toolType").FirstOrDefault().SelectValues = ToolManagerConfig
.ToolTypes.Where(x => !x.Disabled)
.ToDictionary(x => x.Id, x => x.Id.ToString());
}
else if (NcConfig.NcVendor == NC_VENDOR.SIEMENS) // IF == SIEMENS
{
// Update Tool types list
config.ToolsConfiguration.Where(x => x.Name == "toolTypeCode").FirstOrDefault().SelectValues = ToolManagerConfig
.ToolTypes.Where(x => !x.Disabled)
.ToDictionary(x => x.Id, x => x.Id.ToString());
}
return cmsError;
+1 -1
View File
@@ -31,4 +31,4 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.3.1")]
[assembly: AssemblyVersion("1.3.2")]