From 52f6ee5713fed5d07bc7a498948179cd8776db80 Mon Sep 17 00:00:00 2001 From: Marat Fayzullin Date: Thu, 15 Dec 2022 13:03:41 -0500 Subject: [PATCH] Added special case for CW, where receiver tunes 700Hz below the carrier. --- htdocs/lib/Demodulator.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/lib/Demodulator.js b/htdocs/lib/Demodulator.js index 79282b6..0bdb919 100644 --- a/htdocs/lib/Demodulator.js +++ b/htdocs/lib/Demodulator.js @@ -249,7 +249,12 @@ Demodulator.prototype.set_offset_frequency = function(to_what) { if (this.offset_frequency === to_what) { return; } - this.offset_frequency = to_what; + 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.set(); this.emit("frequencychange", to_what); mkenvelopes(get_visible_freq_range());