mirror of
https://github.com/smittix/intercept.git
synced 2026-07-12 19:48:14 -07:00
Remove raw output display and filter DSD startup banner lines
The dmrRawOutput div was rendering garbled box-drawing characters from the dsd-fme ASCII art banner below the signal activity canvas. Remove the div and filter banner lines (box-drawing chars, version info) in the parser so they never become events. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -97,6 +97,13 @@ def parse_dsd_output(line: str) -> dict | None:
|
|||||||
if not line:
|
if not line:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
# Skip DSD/dsd-fme startup banner lines (ASCII art, version info, etc.)
|
||||||
|
# These contain box-drawing characters or are pure decoration.
|
||||||
|
if re.search(r'[╔╗╚╝║═██▀▄╗╝╩╦╠╣╬│┤├┘└┐┌─┼█▓▒░]', line):
|
||||||
|
return None
|
||||||
|
if re.match(r'^\s*(Build Version|MBElib|CODEC2|Audio (Out|In)|Decoding )', line):
|
||||||
|
return None
|
||||||
|
|
||||||
ts = datetime.now().strftime('%H:%M:%S')
|
ts = datetime.now().strftime('%H:%M:%S')
|
||||||
|
|
||||||
# Sync detection: "Sync: +DMR (data)" or "Sync: +P25 Phase 1"
|
# Sync detection: "Sync: +DMR (data)" or "Sync: +P25 Phase 1"
|
||||||
|
|||||||
@@ -193,9 +193,7 @@ function handleDmrMessage(msg) {
|
|||||||
} else if (msg.type === 'slot') {
|
} else if (msg.type === 'slot') {
|
||||||
// Update slot info in current call
|
// Update slot info in current call
|
||||||
} else if (msg.type === 'raw') {
|
} else if (msg.type === 'raw') {
|
||||||
// Raw DSD output — update last line display for diagnostics
|
// Raw DSD output — triggers synthesizer activity via dmrSynthPulse
|
||||||
const rawEl = document.getElementById('dmrRawOutput');
|
|
||||||
if (rawEl) rawEl.textContent = msg.text || '';
|
|
||||||
} else if (msg.type === 'heartbeat') {
|
} else if (msg.type === 'heartbeat') {
|
||||||
// Decoder is alive and listening — keep synthesizer in listening state
|
// Decoder is alive and listening — keep synthesizer in listening state
|
||||||
if (isDmrRunning && dmrSynthInitialized) {
|
if (isDmrRunning && dmrSynthInitialized) {
|
||||||
@@ -222,8 +220,6 @@ function handleDmrMessage(msg) {
|
|||||||
if (typeof showNotification === 'function') {
|
if (typeof showNotification === 'function') {
|
||||||
showNotification('DMR Error', detail);
|
showNotification('DMR Error', detail);
|
||||||
}
|
}
|
||||||
const rawEl = document.getElementById('dmrRawOutput');
|
|
||||||
if (rawEl) rawEl.textContent = detail;
|
|
||||||
} else if (msg.text === 'stopped') {
|
} else if (msg.text === 'stopped') {
|
||||||
isDmrRunning = false;
|
isDmrRunning = false;
|
||||||
updateDmrUI();
|
updateDmrUI();
|
||||||
|
|||||||
@@ -1623,7 +1623,6 @@
|
|||||||
<span id="dmrSynthStatus" style="color: var(--text-muted); font-size: 9px; font-family: var(--font-mono);">IDLE</span>
|
<span id="dmrSynthStatus" style="color: var(--text-muted); font-size: 9px; font-family: var(--font-mono);">IDLE</span>
|
||||||
</div>
|
</div>
|
||||||
<canvas id="dmrSynthCanvas" style="width: 100%; height: 70px; background: rgba(0,0,0,0.4); border-radius: 4px; display: block;"></canvas>
|
<canvas id="dmrSynthCanvas" style="width: 100%; height: 70px; background: rgba(0,0,0,0.4); border-radius: 4px; display: block;"></canvas>
|
||||||
<div id="dmrRawOutput" style="font-size: 9px; font-family: var(--font-mono); color: var(--text-muted); margin-top: 4px; height: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 12px;">
|
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 12px;">
|
||||||
<!-- Call History Panel -->
|
<!-- Call History Panel -->
|
||||||
|
|||||||
Reference in New Issue
Block a user