use bandpass from underlying mode if available

This commit is contained in:
Jakob Ketterl 2023-09-01 19:33:26 +02:00
parent 8bc2fba52a
commit 8d2671fadb

View file

@ -135,8 +135,10 @@ DemodulatorPanel.prototype.setMode = function(requestedModulation, underlyingMod
if (mode.type === 'digimode') {
this.demodulator.set_secondary_demod(mode.modulation);
if (mode.bandpass) {
this.demodulator.setBandpass(mode.bandpass);
var uMode = Modes.findByModulation(underlyingModulation);
var bandpass = mode.bandpass || (uMode && uMode.bandpass);
if (bandpass) {
this.demodulator.setBandpass(bandpass);
} else {
this.demodulator.disableBandpass();
}