Skip to content

Commit 15fd548

Browse files
committed
The PSD chart updates immediately after Y scale sliders change
1 parent 9b7d065 commit 15fd548

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/graph_spectrum.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
191191
debounce(100, function () {
192192
analyserZoomY = 1 / (analyserZoomYElem.val() / 100);
193193
GraphSpectrumPlot.setZoom(analyserZoomX, analyserZoomY);
194+
// Recalculate PSD with updated samples per segment count
195+
if (userSettings.spectrumType == SPECTRUM_TYPE.POWER_SPECTRAL_DENSITY) {
196+
dataLoad();
197+
GraphSpectrumPlot.setData(fftData, userSettings.spectrumType);
198+
}
194199
that.refresh();
195200
})
196201
)

0 commit comments

Comments
 (0)