Skip to content

Commit 9498a6a

Browse files
committed
Improved psd heatmap min max low values initialization
1 parent 8c85509 commit 9498a6a

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/graph_spectrum.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ export function FlightLogAnalyser(flightLog, canvas, analyserCanvas) {
286286
$(this).val(analyserMinPSD.val()).trigger("input");
287287
}
288288
})
289-
.val(analyserMinPSD.val());
289+
.val(analyserMinPSD.val())
290+
.trigger("input");
290291

291292
// Spectrum type to show
292293
userSettings.spectrumType =

src/graph_spectrum_plot.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ export const GraphSpectrumPlot = window.GraphSpectrumPlot || {
4848
_sysConfig: null,
4949
_zoomX: 1.0,
5050
_zoomY: 1.0,
51-
_minPSD: -40,
52-
_maxPSD: 10,
53-
_lowLevelPSD: -40,
51+
// _minPSD, _maxPSD, _lowLevelPSD will initialize later in FlightLogAnalyser from stored settings
52+
_minPSD: 0,
53+
_maxPSD: 0,
54+
_lowLevelPSD: 0,
5455
_drawingParams: {
5556
fontSizeFrameLabel: "6",
5657
fontSizeFrameLabelFullscreen: "9",

src/user_settings_dialog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export function UserSettingsDialog(dialog, onLoad, onSave) {
213213
analyserHanning: true, // use a hanning window on the analyser sample data
214214
eraseBackground: true, // Set to false if you want the graph to draw on top of an existing canvas image
215215
spectrumType: 0, // By default, frequency Spectrum
216-
overdrawSpectrumType: 0, // By default, show all filters,
216+
overdrawSpectrumType: 0, // By default, show all filters
217217
psdHeatmapMin: -40,
218218
psdHeatmapMax: 10,
219219
craft: {

0 commit comments

Comments
 (0)