Add bias_t parameter to SDR command builders

The bias_t parameter was being passed to build_fm_demod_command()
but wasn't defined in the method signatures, causing an unexpected
keyword argument error.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-01-08 12:05:11 +00:00
parent c06a97a20f
commit 24dbfc8ce7
8 changed files with 232 additions and 5 deletions
+5 -1
View File
@@ -64,7 +64,8 @@ class AirspyCommandBuilder(CommandBuilder):
gain: Optional[float] = None,
ppm: Optional[int] = None,
modulation: str = "fm",
squelch: Optional[int] = None
squelch: Optional[int] = None,
bias_t: bool = False
) -> list[str]:
"""
Build SoapySDR rx_fm command for FM demodulation.
@@ -87,6 +88,9 @@ class AirspyCommandBuilder(CommandBuilder):
if squelch is not None and squelch > 0:
cmd.extend(['-l', str(squelch)])
if bias_t:
cmd.extend(['-T'])
# Output to stdout
cmd.append('-')
+3 -1
View File
@@ -93,7 +93,8 @@ class CommandBuilder(ABC):
gain: Optional[float] = None,
ppm: Optional[int] = None,
modulation: str = "fm",
squelch: Optional[int] = None
squelch: Optional[int] = None,
bias_t: bool = False
) -> list[str]:
"""
Build FM demodulation command (for pager decoding).
@@ -106,6 +107,7 @@ class CommandBuilder(ABC):
ppm: PPM frequency correction
modulation: Modulation type (fm, am, etc.)
squelch: Squelch level
bias_t: Enable bias-T power (for active antennas)
Returns:
Command as list of strings for subprocess
+5 -1
View File
@@ -60,7 +60,8 @@ class HackRFCommandBuilder(CommandBuilder):
gain: Optional[float] = None,
ppm: Optional[int] = None,
modulation: str = "fm",
squelch: Optional[int] = None
squelch: Optional[int] = None,
bias_t: bool = False
) -> list[str]:
"""
Build SoapySDR rx_fm command for FM demodulation.
@@ -84,6 +85,9 @@ class HackRFCommandBuilder(CommandBuilder):
if squelch is not None and squelch > 0:
cmd.extend(['-l', str(squelch)])
if bias_t:
cmd.extend(['-T'])
# Output to stdout
cmd.append('-')
+3 -1
View File
@@ -41,12 +41,14 @@ class LimeSDRCommandBuilder(CommandBuilder):
gain: Optional[float] = None,
ppm: Optional[int] = None,
modulation: str = "fm",
squelch: Optional[int] = None
squelch: Optional[int] = None,
bias_t: bool = False
) -> list[str]:
"""
Build SoapySDR rx_fm command for FM demodulation.
For pager decoding with LimeSDR.
Note: LimeSDR does not support bias-T, parameter is ignored.
"""
device_str = self._build_device_string(device)
+5 -1
View File
@@ -45,7 +45,8 @@ class RTLSDRCommandBuilder(CommandBuilder):
gain: Optional[float] = None,
ppm: Optional[int] = None,
modulation: str = "fm",
squelch: Optional[int] = None
squelch: Optional[int] = None,
bias_t: bool = False
) -> list[str]:
"""
Build rtl_fm command for FM demodulation.
@@ -69,6 +70,9 @@ class RTLSDRCommandBuilder(CommandBuilder):
if squelch is not None and squelch > 0:
cmd.extend(['-l', str(squelch)])
if bias_t:
cmd.extend(['-T'])
# Output to stdout for piping
cmd.append('-')