Fix aplituted test
This commit is contained in:
parent
4cc48df3cf
commit
cfe5367544
@ -155,7 +155,7 @@
|
||||
</site>
|
||||
<site name="MeterProcessState" id="2">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="D:\Projekte\SENSUS_GitLab\laa_production\Common\Service\MeterProcessState" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\drabesch_ro\Repo\lab\la_operations\laa_production\Common\Service\MeterProcessState" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:56011:localhost" />
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{D0C8D887-ED52-40AB-A069-90BCE0E801E2}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Xylem.Common.Ui.CordonelPreadjustmentUi</RootNamespace>
|
||||
<AssemblyName>Xylem.Common.Ui.CordonelPreadjustmentUi</AssemblyName>
|
||||
@ -110,9 +110,7 @@
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<NoWin32Manifest>true</NoWin32Manifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||
|
||||
@ -159,61 +159,31 @@ namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
Ok = true;
|
||||
#endregion
|
||||
#region Calculate mean value
|
||||
|
||||
if (true)
|
||||
for (UInt16 Path = 0; Path < meterctl.Meter.listOfTotalTimeOfFlightSPerPath.GetPathCount(); Path++)
|
||||
{
|
||||
var meanVal = meterctl.Meter.listOfTotalTimeOfFlightSPerPath.Get(1).ToList().Mean();
|
||||
pp.DebugMessage($"Calculate mean value {meanVal} at {meterctl.Meter.Slot}; PATH{(1 + 1).ToString(pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
var meanVal = meterctl.Meter.listOfTotalTimeOfFlightSPerPath.Get(Path).ToList().Mean();
|
||||
pp.DebugMessage($"Calculate mean value {meanVal} at {meterctl.Meter.Slot}; PATH{(Path + 1).ToString(pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
//earlier TofAvgMeanTotal
|
||||
//TofAvgMean.Update(Path, meanVal);
|
||||
|
||||
if (meanVal == 0)
|
||||
{
|
||||
pp.DebugMessage($"Mean value is zero at {meterctl.Meter.Slot}; PATH{(1 + 1).ToString(pp.Setting.Culture)}; Value = {Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
pp.DebugMessage($"Mean value is zero at {meterctl.Meter.Slot}; PATH{(Path + 1).ToString(pp.Setting.Culture)}; Value = {Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
meterctl.Meter.calibrationResult.AddAdditionalLog($"" +
|
||||
$"PATH {1 + 1}", Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture));
|
||||
$"PATH {Path + 1}", Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture));
|
||||
|
||||
if (CheckAbort(false, meterctl)) { return false; }
|
||||
}
|
||||
|
||||
pp.DebugMessage($"Mean value at {meterctl.Meter.Slot}; PATH{(1 + 1).ToString(pp.Setting.Culture)}; Value = {Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
pp.DebugMessage($"Mean value at {meterctl.Meter.Slot}; PATH{(Path + 1).ToString(pp.Setting.Culture)}; Value = {Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
|
||||
meterctl.Meter.calibrationResult.AddAdditionalLog($"Amp. Test Mean value PATH {1 + 1}", $"at {FirstHitLevelPercentage}={Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}");
|
||||
var cTofAvgMeanTotal = TofAvgMeanTotal.Get(1).ToList();
|
||||
meterctl.Meter.calibrationResult.AddAdditionalLog($"Amp. Test Mean value PATH {Path + 1}", $"at {FirstHitLevelPercentage}={Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}");
|
||||
var cTofAvgMeanTotal = TofAvgMeanTotal.Get(Path).ToList();
|
||||
|
||||
cTofAvgMeanTotal.Add(meanVal);
|
||||
TofAvgMeanTotal.Update(1, cTofAvgMeanTotal);
|
||||
TofAvgMeanTotal.Update(Path, cTofAvgMeanTotal);
|
||||
//meterctl.Meter.listOfTotalTimeOfFlightSPerPath.Update(Path,new List<Double>());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
for (UInt16 Path = 0; Path < meterctl.Meter.listOfTotalTimeOfFlightSPerPath.GetPathCount(); Path++)
|
||||
{
|
||||
var meanVal = meterctl.Meter.listOfTotalTimeOfFlightSPerPath.Get(Path).ToList().Mean();
|
||||
pp.DebugMessage($"Calculate mean value {meanVal} at {meterctl.Meter.Slot}; PATH{(Path + 1).ToString(pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
//earlier TofAvgMeanTotal
|
||||
//TofAvgMean.Update(Path, meanVal);
|
||||
|
||||
if (meanVal == 0)
|
||||
{
|
||||
pp.DebugMessage($"Mean value is zero at {meterctl.Meter.Slot}; PATH{(Path + 1).ToString(pp.Setting.Culture)}; Value = {Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
meterctl.Meter.calibrationResult.AddAdditionalLog($"" +
|
||||
$"PATH {Path + 1}", Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture));
|
||||
|
||||
if (CheckAbort(false, meterctl)) { return false; }
|
||||
}
|
||||
|
||||
pp.DebugMessage($"Mean value at {meterctl.Meter.Slot}; PATH{(Path + 1).ToString(pp.Setting.Culture)}; Value = {Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}", meterctl.Meter.Slot, "DC", meterctl.Meter.PcbId);
|
||||
|
||||
meterctl.Meter.calibrationResult.AddAdditionalLog($"Amp. Test Mean value PATH {Path + 1}", $"at {FirstHitLevelPercentage}={Math.Round(meanVal, 4).ToString("000.0000", pp.Setting.Culture)}");
|
||||
var cTofAvgMeanTotal = TofAvgMeanTotal.Get(Path).ToList();
|
||||
|
||||
cTofAvgMeanTotal.Add(meanVal);
|
||||
TofAvgMeanTotal.Update(Path, cTofAvgMeanTotal);
|
||||
//meterctl.Meter.listOfTotalTimeOfFlightSPerPath.Update(Path,new List<Double>());
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@ -252,7 +222,7 @@ namespace CordonelPreadjustmentUi.Processes.Actions
|
||||
var tmpOptimalPoint = 0;
|
||||
var tmpDistanceLeft = 0.0;
|
||||
var tmpDistanceRight = 0.0;
|
||||
|
||||
|
||||
var r = CalculateOptimalPoint(pp, meterctl.Meter.Slot, TofAvgMeanTotal.Get(Path).ToList(), out tmpDistanceLeft, out tmpDistanceRight, out tmpOptimalPoint);
|
||||
OptimalPoint.Update(Path, tmpOptimalPoint);
|
||||
DistanceLeft.Update(Path, tmpDistanceLeft);
|
||||
|
||||
@ -1 +1 @@
|
||||
bf6bb8fceb3db5a9977dadc407cf576684bf7127
|
||||
c43c40a030005a8f189e6179faf40a6d42bfef5c
|
||||
|
||||
@ -1 +1 @@
|
||||
247396738e2c5d26ac00f9df05c0cc5c61d7f33a
|
||||
65d75c3322f8a137c69963cfdc0cb6f1ffacf62a
|
||||
|
||||
@ -1946,7 +1946,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
{
|
||||
//Seal Display test
|
||||
_currentGenesis.WriteRegister("SYSTEM_ExitReason", 21, true, false);
|
||||
var exitResult = RegisterConverter.ConvertTo<Int16>(_currentGenesis.ReadRegister("SYSTEM_ExitReason"));
|
||||
var exitResult = RegisterConverter.ByteArrayToValue<Int16>(_currentGenesis.ReadRegister("SYSTEM_ExitReason"));
|
||||
|
||||
MessageBox.Show(exitResult.ToString());
|
||||
|
||||
@ -1968,7 +1968,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
|
||||
}
|
||||
}
|
||||
_currentGenesis.WriteRegister("SYSTEM_ExitReason", 21, true, false);
|
||||
exitResult = RegisterConverter.ConvertTo<Int16>(_currentGenesis.ReadRegister("SYSTEM_ExitReason"));
|
||||
exitResult = RegisterConverter.ByteArrayToValue<Int16>(_currentGenesis.ReadRegister("SYSTEM_ExitReason"));
|
||||
|
||||
MessageBox.Show(exitResult.ToString());
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user