Bug fix in Statistics : Min, Max calculation and UpdateGraph( ), ver. 2.18.1049

This commit is contained in:
Milan Hanajik 2018-11-02 11:32:28 +01:00
parent c28c5a5554
commit 668304cb72
2 changed files with 9 additions and 9 deletions

View File

@ -156,10 +156,10 @@ namespace TBF.BenchControl.Sequences
sum += filteredValue;
if (count == 0) first = filteredValue;
last = filteredValue;
if (value < min) min = filteredValue;
if (value > max) max = filteredValue;
if (filteredValue < min) min = filteredValue;
if (filteredValue > max) max = filteredValue;
plotter.UpdateGraph(graphId, (float)(count + skippedSamplesCount + FilterSize / 2), (float)value);
plotter.UpdateGraph(graphId, (float)(count + skippedSamplesCount + FilterSize / 2), (float)filteredValue);
count++;
}
@ -183,15 +183,15 @@ namespace TBF.BenchControl.Sequences
/// Shift values in FIFO buffer, calculate the sum
double sum = 0;
double sum1 = 0;
for (int i = FilterSize - 1; i > 0; i--)
{
fifo[i] = fifo[i - 1];
sum += fifo[i];
sum1 += fifo[i];
}
/// Insert the current value into FIFO, add it to the sum
fifo[0] = value;
sum += value;
sum1 += value;
fifoCount++;
@ -220,7 +220,7 @@ namespace TBF.BenchControl.Sequences
}
else
{
filteredValue = sum / FilterSize;
filteredValue = sum1 / FilterSize;
}
return true;

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.18.1047.0")]
[assembly: AssemblyFileVersion("2.18.1047.0")]
[assembly: AssemblyVersion("2.18.1049.0")]
[assembly: AssemblyFileVersion("2.18.1049.0")]