openwebrx-clone/owrx/source/rtl_sdr.py
2021-02-19 14:53:30 +01:00

26 lines
732 B
Python

from .connector import ConnectorSource
from owrx.command import Flag, Option
from owrx.controllers.settings.device import SdrDeviceDescription
from typing import List
from owrx.form import Input, TextInput
class RtlSdrSource(ConnectorSource):
def getCommandMapper(self):
return (
super()
.getCommandMapper()
.setBase("rtl_connector")
.setMappings({"bias_tee": Flag("-b"), "direct_sampling": Option("-e")})
)
class RtlSdrDeviceDescription(SdrDeviceDescription):
def getInputs(self) -> List[Input]:
return self.mergeInputs(
super().getInputs(),
[
TextInput("test", "This is a drill"),
],
)