Cleaning up restoring secondary demodulator.

This commit is contained in:
Marat Fayzullin 2024-03-12 23:38:00 -04:00
parent d940dd5fd3
commit 51aa78c478
1 changed files with 4 additions and 5 deletions

View File

@ -639,10 +639,9 @@ class DspManager(SdrSourceEventClient, ClientDemodulatorSecondaryDspEventClient)
self.wireOutput(self.audioOutput, buffer)
# recreate secondary demodulator, if present
mod2 = self.props["secondary_mod"] if "secondary_mod" in self.props else False
if mod2:
underlying = Modes.findByModulation(mod2).underlying
if mod in underlying or "empty" in underlying:
mod2 = self.props["secondary_mod"] if "secondary_mod" in self.props else ""
desc = Modes.findByModulation(mod2)
if hasattr(desc, "underlying") and mod in desc.underlying:
self.setSecondaryDemodulator(mod2)
except DemodulatorError as de: