Fix WeFax error detection and surface errors in strip UI

rtl_fm subprocess failures (missing tool, no SDR hardware) were silent —
add tool-path check and post-spawn health check in _start_pipeline(),
show errors prominently in the strip status bar (red text + red dot),
and include error detail in scheduler skip events.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-02-24 15:53:57 +00:00
parent 2da8dca167
commit b72a2f1092
3 changed files with 44 additions and 3 deletions
+17 -2
View File
@@ -192,11 +192,15 @@ var WeFax = (function () {
setStripFreq(freqKhz);
connectSSE();
} else {
setStatus('Error: ' + (data.message || 'unknown'));
var errMsg = data.message || 'unknown error';
setStatus('Error: ' + errMsg);
showStripError(errMsg);
}
})
.catch(function (err) {
setStatus('Error: ' + err.message);
var errMsg = err.message || 'Network error';
setStatus('Error: ' + errMsg);
showStripError(errMsg);
});
}
@@ -323,6 +327,7 @@ var WeFax = (function () {
if (data.status === 'error') {
state.running = false;
updateButtons(false);
showStripError(data.message || 'Decode error');
}
if (data.status === 'stopped') {
@@ -680,6 +685,16 @@ var WeFax = (function () {
if (el) el.textContent = String(khz);
}
function showStripError(msg) {
var statusEl = document.getElementById('wefaxStripStatus');
if (statusEl) {
statusEl.textContent = 'Error: ' + msg;
statusEl.style.color = '#ff4444';
}
var dot = document.getElementById('wefaxStripDot');
if (dot) dot.className = 'wefax-strip-dot error';
}
function flashStartError() {
setStatus('Select a station and frequency first');