let the client initiate the dsp again

This commit is contained in:
Jakob Ketterl
2020-09-19 21:35:14 +02:00
parent 34414de4e5
commit 71a2352d2b
2 changed files with 10 additions and 11 deletions

View File

@ -249,12 +249,17 @@ DemodulatorPanel.prototype.updateButtons = function() {
}
DemodulatorPanel.prototype.setCenterFrequency = function(center_freq) {
if (this.center_freq === center_freq) {
return;
var me = this;
if (me.centerFreqTimeout) {
clearTimeout(me.centerFreqTimeout);
me.centerFreqTimeout = false;
}
this.stopDemodulator();
this.center_freq = center_freq;
this.startDemodulator();
this.centerFreqTimeout = setTimeout(function() {
me.stopDemodulator();
me.center_freq = center_freq;
me.startDemodulator();
me.centerFreqTimeout = false;
}, 50);
};
DemodulatorPanel.prototype.parseHash = function() {