Force explicit rtl_fm squelch-off and log first PCM chunk

This commit is contained in:
Smittix
2026-02-26 11:59:07 +00:00
parent 63cc1647fb
commit c1dd615e11
2 changed files with 17 additions and 0 deletions

View File

@@ -296,6 +296,14 @@ def start_morse() -> Response:
**fm_kwargs,
)
# Some rtl_fm builds behave as if squelch is enabled unless -l is explicit.
# Force continuous audio for CW analysis.
if sdr_device.sdr_type == SDRType.RTL_SDR and '-l' not in rtl_cmd:
if rtl_cmd and rtl_cmd[-1] == '-':
rtl_cmd[-1:-1] = ['-l', '0']
else:
rtl_cmd.extend(['-l', '0'])
full_cmd = ' '.join(rtl_cmd)
logger.info(f'Morse decoder running: {full_cmd}')