mirror of
https://github.com/smittix/intercept.git
synced 2026-07-28 10:38:12 -07:00
fix: Add missing SSTV mode specs for HF decoding (PD90/PD160/PD240/ScottieDX)
VIS detection recognized these modes but ALL_MODES had no decoder specs, causing silent decode failures on common HF frequencies like 14.230 MHz. Also emit a user-visible SSE event when an unsupported VIS code is detected. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+77
-2
@@ -223,6 +223,81 @@ PD_180 = SSTVMode(
|
|||||||
line_duration_ms=754.240,
|
line_duration_ms=754.240,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
PD_90 = SSTVMode(
|
||||||
|
name='PD90',
|
||||||
|
vis_code=96,
|
||||||
|
width=640,
|
||||||
|
height=496,
|
||||||
|
color_model=ColorModel.YCRCB_DUAL,
|
||||||
|
sync_position=SyncPosition.FRONT_PD,
|
||||||
|
sync_duration_ms=20.0,
|
||||||
|
sync_porch_ms=2.080,
|
||||||
|
channels=[
|
||||||
|
ChannelTiming(duration_ms=91.520), # Y1
|
||||||
|
ChannelTiming(duration_ms=91.520), # Cr
|
||||||
|
ChannelTiming(duration_ms=91.520), # Cb
|
||||||
|
ChannelTiming(duration_ms=91.520), # Y2
|
||||||
|
],
|
||||||
|
line_duration_ms=388.160,
|
||||||
|
)
|
||||||
|
|
||||||
|
PD_160 = SSTVMode(
|
||||||
|
name='PD160',
|
||||||
|
vis_code=98,
|
||||||
|
width=640,
|
||||||
|
height=496,
|
||||||
|
color_model=ColorModel.YCRCB_DUAL,
|
||||||
|
sync_position=SyncPosition.FRONT_PD,
|
||||||
|
sync_duration_ms=20.0,
|
||||||
|
sync_porch_ms=2.080,
|
||||||
|
channels=[
|
||||||
|
ChannelTiming(duration_ms=152.960), # Y1
|
||||||
|
ChannelTiming(duration_ms=152.960), # Cr
|
||||||
|
ChannelTiming(duration_ms=152.960), # Cb
|
||||||
|
ChannelTiming(duration_ms=152.960), # Y2
|
||||||
|
],
|
||||||
|
line_duration_ms=633.920,
|
||||||
|
)
|
||||||
|
|
||||||
|
PD_240 = SSTVMode(
|
||||||
|
name='PD240',
|
||||||
|
vis_code=113,
|
||||||
|
width=640,
|
||||||
|
height=496,
|
||||||
|
color_model=ColorModel.YCRCB_DUAL,
|
||||||
|
sync_position=SyncPosition.FRONT_PD,
|
||||||
|
sync_duration_ms=20.0,
|
||||||
|
sync_porch_ms=2.080,
|
||||||
|
channels=[
|
||||||
|
ChannelTiming(duration_ms=244.480), # Y1
|
||||||
|
ChannelTiming(duration_ms=244.480), # Cr
|
||||||
|
ChannelTiming(duration_ms=244.480), # Cb
|
||||||
|
ChannelTiming(duration_ms=244.480), # Y2
|
||||||
|
],
|
||||||
|
line_duration_ms=1000.000,
|
||||||
|
)
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Scottie DX
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
SCOTTIE_DX = SSTVMode(
|
||||||
|
name='ScottieDX',
|
||||||
|
vis_code=55,
|
||||||
|
width=320,
|
||||||
|
height=256,
|
||||||
|
color_model=ColorModel.RGB,
|
||||||
|
sync_position=SyncPosition.MIDDLE,
|
||||||
|
sync_duration_ms=9.0,
|
||||||
|
sync_porch_ms=1.5,
|
||||||
|
channels=[
|
||||||
|
ChannelTiming(duration_ms=345.600), # Green
|
||||||
|
ChannelTiming(duration_ms=345.600), # Blue
|
||||||
|
ChannelTiming(duration_ms=345.600), # Red
|
||||||
|
],
|
||||||
|
line_duration_ms=1050.300,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Mode registry
|
# Mode registry
|
||||||
@@ -232,8 +307,8 @@ ALL_MODES: dict[int, SSTVMode] = {
|
|||||||
m.vis_code: m for m in [
|
m.vis_code: m for m in [
|
||||||
ROBOT_36, ROBOT_72,
|
ROBOT_36, ROBOT_72,
|
||||||
MARTIN_1, MARTIN_2,
|
MARTIN_1, MARTIN_2,
|
||||||
SCOTTIE_1, SCOTTIE_2,
|
SCOTTIE_1, SCOTTIE_2, SCOTTIE_DX,
|
||||||
PD_120, PD_180,
|
PD_90, PD_120, PD_160, PD_180, PD_240,
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -490,6 +490,10 @@ class SSTVDecoder:
|
|||||||
))
|
))
|
||||||
else:
|
else:
|
||||||
logger.warning(f"No mode spec for VIS code {vis_code}")
|
logger.warning(f"No mode spec for VIS code {vis_code}")
|
||||||
|
self._emit_progress(DecodeProgress(
|
||||||
|
status='detecting',
|
||||||
|
message=f'Detected unknown mode (VIS {vis_code}: {mode_name}) - unsupported',
|
||||||
|
))
|
||||||
|
|
||||||
# Emit signal level metrics every ~500ms (every 5th 100ms chunk)
|
# Emit signal level metrics every ~500ms (every 5th 100ms chunk)
|
||||||
scope_tone: str | None = None
|
scope_tone: str | None = None
|
||||||
|
|||||||
Reference in New Issue
Block a user