morse: fix SNR threshold for real CW and stop timeout

Widen noise detector offset from ±100Hz to ±200Hz to reduce spectral
leakage into the noise reference, and scale threshold_multiplier for
SNR space (2.8 → 1.54) so real CW signals reliably trigger tone
detection instead of producing all-E's at 60 WPM.

Fix misleading "decoder startup" timeout message on stop requests and
increase stop timeout from 2.2s to 5s.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-02-26 21:30:43 +00:00
parent be522d4dfe
commit 97b10b3ac9
2 changed files with 8 additions and 7 deletions

View File

@@ -7,7 +7,7 @@ var MorseMode = (function () {
var SETTINGS_KEY = 'intercept.morse.settings.v3';
var STATUS_POLL_MS = 5000;
var LOCAL_STOP_TIMEOUT_MS = 2200;
var LOCAL_STOP_TIMEOUT_MS = 5000;
var START_TIMEOUT_MS = 60000;
var state = {
@@ -87,7 +87,7 @@ var MorseMode = (function () {
});
}).catch(function (err) {
if (err && err.name === 'AbortError') {
throw new Error('Request timed out while waiting for decoder startup');
throw new Error('Request timed out');
}
throw err;
}).finally(function () {