mirror of
https://github.com/jketterl/openwebrx.git
synced 2026-04-05 06:26:50 +00:00
added option to run demodulator without bandpass
This commit is contained in:
parent
5b86ebdcba
commit
37ee7796db
7 changed files with 64 additions and 15 deletions
|
|
@ -83,9 +83,13 @@ Envelope.prototype.draw = function(visible_range){
|
|||
scale_ctx.stroke();
|
||||
scale_ctx.lineWidth = 1;
|
||||
scale_ctx.textAlign = "left";
|
||||
scale_ctx.fillText(this.demodulator.high_cut.toString(), to_px + env_att_w, env_h2);
|
||||
if (this.demodulator.high_cut) {
|
||||
scale_ctx.fillText(this.demodulator.high_cut.toString(), to_px + env_att_w, env_h2);
|
||||
}
|
||||
scale_ctx.textAlign = "right";
|
||||
scale_ctx.fillText(this.demodulator.low_cut.toString(), from_px - env_att_w, env_h2);
|
||||
if (this.demodulator.low_cut) {
|
||||
scale_ctx.fillText(this.demodulator.low_cut.toString(), from_px - env_att_w, env_h2);
|
||||
}
|
||||
scale_ctx.lineWidth = 3;
|
||||
}
|
||||
if (typeof line !== "undefined") // out of screen?
|
||||
|
|
@ -332,6 +336,13 @@ Demodulator.prototype.setBandpass = function(bandpass) {
|
|||
this.set();
|
||||
};
|
||||
|
||||
Demodulator.prototype.disableBandpass = function() {
|
||||
delete this.bandpass;
|
||||
this.low_cut = null;
|
||||
this.high_cut = null;
|
||||
this.set()
|
||||
}
|
||||
|
||||
Demodulator.prototype.setLowCut = function(low_cut) {
|
||||
this.low_cut = low_cut;
|
||||
this.set();
|
||||
|
|
|
|||
|
|
@ -137,6 +137,8 @@ DemodulatorPanel.prototype.setMode = function(requestedModulation, underlyingMod
|
|||
this.demodulator.set_secondary_demod(mode.modulation);
|
||||
if (mode.bandpass) {
|
||||
this.demodulator.setBandpass(mode.bandpass);
|
||||
} else {
|
||||
this.demodulator.disableBandpass();
|
||||
}
|
||||
} else {
|
||||
this.demodulator.set_secondary_demod(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue