keep back changes until start command is given

This commit is contained in:
Jakob Ketterl 2020-05-03 13:10:25 +02:00
parent e92a91663d
commit ac136313cb

View File

@ -185,6 +185,7 @@ function Demodulator(offset_frequency, modulation) {
this.filter = new Filter(this);
this.squelch_level = -150;
this.dmr_filter = 3;
this.started = false;
this.state = {};
this.secondary_demod = false;
var mode = Modes.findByModulation(modulation);
@ -248,6 +249,7 @@ Demodulator.prototype.get_modulation = function() {
};
Demodulator.prototype.start = function() {
this.started = true;
this.set();
ws.send(JSON.stringify({
"type": "dspcontrol",
@ -264,6 +266,7 @@ Demodulator.prototype.send = function(params) {
}
Demodulator.prototype.set = function () { //this function sends demodulator parameters to the server
if (!this.started) return;
var params = {
"low_cut": this.low_cut,
"high_cut": this.high_cut,