make "digimodes_fft_size" work from web config

This commit is contained in:
Jakob Ketterl
2021-04-05 17:18:30 +02:00
parent a9990f1f41
commit c0ca216e4d
3 changed files with 22 additions and 11 deletions

View File

@ -137,21 +137,25 @@ class DspManager(csdr.output, SdrSourceEventClient):
if self.props["digimodes_enable"]:
def send_secondary_config(*args):
self.handler.write_secondary_dsp_config(
{
"secondary_fft_size": self.props["digimodes_fft_size"],
"if_samp_rate": self.dsp.if_samp_rate(),
"secondary_bw": self.dsp.secondary_bw(),
}
)
def set_secondary_mod(mod):
if mod == False:
mod = None
self.dsp.set_secondary_demodulator(mod)
if mod is not None:
self.handler.write_secondary_dsp_config(
{
"secondary_fft_size": self.props["digimodes_fft_size"],
"if_samp_rate": self.dsp.if_samp_rate(),
"secondary_bw": self.dsp.secondary_bw(),
}
)
send_secondary_config()
self.subscriptions += [
self.props.wireProperty("secondary_mod", set_secondary_mod),
self.props.wireProperty("digimodes_fft_size", send_secondary_config),
self.props.wireProperty("secondary_offset_freq", self.dsp.set_secondary_offset_freq),
]