add secondary demod (not working with my csdr atm, unable to test.)
This commit is contained in:
parent
628731cba4
commit
a4313c3340
@ -2628,18 +2628,18 @@ function secondary_demod_init()
|
|||||||
function secondary_demod_start(subtype)
|
function secondary_demod_start(subtype)
|
||||||
{
|
{
|
||||||
secondary_demod_canvases_initialized = false;
|
secondary_demod_canvases_initialized = false;
|
||||||
ws.send("SET secondary_mod="+subtype);
|
ws.send(JSON.stringify({"type":"dspcontrol","params":{"secondary_mod":subtype}}));
|
||||||
secondary_demod = subtype;
|
secondary_demod = subtype;
|
||||||
}
|
}
|
||||||
|
|
||||||
function secondary_demod_set()
|
function secondary_demod_set()
|
||||||
{
|
{
|
||||||
ws.send("SET secondary_offset_freq="+secondary_demod_offset_freq.toString());
|
ws.send(JSON.stringify({"type":"dspcontrol","params":{"secondary_offset_freq":secondary_demod_offset_freq}}));
|
||||||
}
|
}
|
||||||
|
|
||||||
function secondary_demod_stop()
|
function secondary_demod_stop()
|
||||||
{
|
{
|
||||||
ws.send("SET secondary_mod=off");
|
ws.send(JSON.stringify({"type":"dspcontrol","params":{"secondary_mod":false}}));
|
||||||
secondary_demod = false;
|
secondary_demod = false;
|
||||||
secondary_demod_waterfall_queue = [];
|
secondary_demod_waterfall_queue = [];
|
||||||
}
|
}
|
||||||
@ -2767,7 +2767,7 @@ function secondary_demod_update_channel_freq_from_event(evt)
|
|||||||
{
|
{
|
||||||
secondary_demod_waiting_for_set = true;
|
secondary_demod_waiting_for_set = true;
|
||||||
window.setTimeout(()=>{
|
window.setTimeout(()=>{
|
||||||
ws.send("SET secondary_offset_freq="+Math.floor(secondary_demod_channel_freq));
|
ws.send(JSON.stringify({"type":"dspcontrol","params":{"secondary_offset_freq":Math.floor(secondary_demod_channel_freq)}}));
|
||||||
//console.log("doneset:", secondary_demod_channel_freq);
|
//console.log("doneset:", secondary_demod_channel_freq);
|
||||||
secondary_demod_waiting_for_set = false;
|
secondary_demod_waiting_for_set = false;
|
||||||
}, 50);
|
}, 50);
|
||||||
|
@ -136,6 +136,21 @@ class DspManager(object):
|
|||||||
self.dsp.start()
|
self.dsp.start()
|
||||||
self.localProps.getProperty("mod").wire(set_mod)
|
self.localProps.getProperty("mod").wire(set_mod)
|
||||||
|
|
||||||
|
if (pm.getPropertyValue("digimodes_enable")):
|
||||||
|
def set_secondary_mod(mod):
|
||||||
|
self.dsp.stop()
|
||||||
|
if mod == False:
|
||||||
|
self.dsp.set_secondary_demodulator(None)
|
||||||
|
else:
|
||||||
|
self.dsp.set_secondary_demodulator(mod)
|
||||||
|
# TODO frontend will probably miss this
|
||||||
|
#rxws.send(self, "MSG secondary_fft_size={0} if_samp_rate={1} secondary_bw={2} secondary_setup".format(cfg.digimodes_fft_size, dsp.if_samp_rate(), dsp.secondary_bw()))
|
||||||
|
self.dsp.start()
|
||||||
|
|
||||||
|
self.localProps.getProperty("secondary_mod").wire(set_secondary_mod)
|
||||||
|
|
||||||
|
self.localProps.getProperty("secondary_offset_freq").wire(self.dsp.set_secondary_offset_freq)
|
||||||
|
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user