Added special case for CW, where receiver tunes 700Hz below the carrier.

This commit is contained in:
Marat Fayzullin 2022-12-15 13:03:41 -05:00
parent 834cdbc75f
commit 52f6ee5713

View File

@ -249,7 +249,12 @@ Demodulator.prototype.set_offset_frequency = function(to_what) {
if (this.offset_frequency === to_what) { if (this.offset_frequency === to_what) {
return; return;
} }
if (this.get_modulation() === 'cw') {
// For CW, move offset 700Hz below the actual carrier
this.offset_frequency = to_what - 700;
} else {
this.offset_frequency = to_what; this.offset_frequency = to_what;
}
this.set(); this.set();
this.emit("frequencychange", to_what); this.emit("frequencychange", to_what);
mkenvelopes(get_visible_freq_range()); mkenvelopes(get_visible_freq_range());