improve squelch handling

squelch is now included in the URL hash
some modes now have the squelch visually disabled, refs #65
This commit is contained in:
Jakob Ketterl
2020-05-03 19:55:48 +02:00
parent d98abe42bc
commit beed0c1a70
8 changed files with 104 additions and 45 deletions

View File

@ -194,7 +194,8 @@ function Demodulator(offset_frequency, modulation) {
this.high_cut = mode.bandpass.high_cut;
}
this.listeners = {
"frequencychange": []
"frequencychange": [],
"squelchchange": []
};
}
@ -293,8 +294,16 @@ Demodulator.prototype.set = function () { //this function sends demodulator par
};
Demodulator.prototype.setSquelch = function(squelch) {
if (this.squelch_level == squelch) {
return;
}
this.squelch_level = squelch;
this.set();
this.emit("squelchchange", squelch);
};
Demodulator.prototype.getSquelch = function() {
return this.squelch_level;
};
Demodulator.prototype.setDmrFilter = function(dmr_filter) {