Skip to content

Commit abfac2c

Browse files
authored
Revert "Added missing slices of data samples arrays in spectrum calc" (#831)
Revert "Added missing slices of data samples arrays in spectrum calc (#819)" This reverts commit 3639e69.
1 parent 1480a62 commit abfac2c

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

src/graph_spectrum_calc.js

+16-17
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,13 @@ GraphSpectrumCalc._dataLoadFrequencyVsX = function(vsFieldNames, minValue = Infi
205205
// blur algorithm to the heat map image
206206

207207
const fftData = {
208-
fieldIndex : this._dataBuffer.fieldIndex,
209-
fieldName : this._dataBuffer.fieldName,
210-
fftLength : fftChunkLength,
211-
fftOutput : matrixFftOutput,
212-
maxNoise : maxNoise,
213-
blackBoxRate : this._blackBoxRate,
214-
vsRange : { min: flightSamples.minValue, max: flightSamples.maxValue},
208+
fieldIndex : this._dataBuffer.fieldIndex,
209+
fieldName : this._dataBuffer.fieldName,
210+
fftLength : fftChunkLength,
211+
fftOutput : matrixFftOutput,
212+
maxNoise : maxNoise,
213+
blackBoxRate : this._blackBoxRate,
214+
vsRange : { min: flightSamples.minValue, max: flightSamples.maxValue},
215215
};
216216

217217
return fftData;
@@ -330,7 +330,7 @@ GraphSpectrumCalc._getFlightSamplesFreq = function(scaled = true) {
330330
}
331331

332332
return {
333-
samples : samples.slice(0, samplesCount),
333+
samples : samples,
334334
count : samplesCount,
335335
};
336336
};
@@ -410,14 +410,13 @@ GraphSpectrumCalc._getFlightSamplesFreqVsX = function(vsFieldNames, minValue = I
410410
for (const vsValueArray of vsValues) {
411411
slicedVsValues.push(vsValueArray.slice(0, samplesCount));
412412
}
413-
414413
return {
415-
samples : samples.slice(0, samplesCount),
416-
vsValues : slicedVsValues,
417-
count : samplesCount,
418-
minValue : minValue,
419-
maxValue : maxValue,
420-
};
414+
samples : samples.slice(0, samplesCount),
415+
vsValues : slicedVsValues,
416+
count : samplesCount,
417+
minValue : minValue,
418+
maxValue : maxValue,
419+
};
421420
};
422421

423422
GraphSpectrumCalc._getFlightSamplesPidErrorVsSetpoint = function(axisIndex) {
@@ -446,8 +445,8 @@ GraphSpectrumCalc._getFlightSamplesPidErrorVsSetpoint = function(axisIndex) {
446445
}
447446

448447
return {
449-
piderror: piderror.slice(0, samplesCount),
450-
setpoint: setpoint.slice(0, samplesCount),
448+
piderror,
449+
setpoint,
451450
maxSetpoint,
452451
count: samplesCount,
453452
};

0 commit comments

Comments
 (0)