2019-12-21 20:58:28 +01:00
|
|
|
from .connector import ConnectorSource
|
2020-04-01 23:37:40 +02:00
|
|
|
from owrx.command import Flag, Option
|
2021-02-19 14:44:16 +01:00
|
|
|
from owrx.controllers.settings.device import SdrDeviceDescription
|
|
|
|
|
from typing import List
|
|
|
|
|
from owrx.form import Input, TextInput
|
2019-12-21 20:58:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class RtlSdrSource(ConnectorSource):
|
2019-12-31 19:14:05 +01:00
|
|
|
def getCommandMapper(self):
|
2020-04-01 23:37:40 +02:00
|
|
|
return (
|
|
|
|
|
super()
|
|
|
|
|
.getCommandMapper()
|
|
|
|
|
.setBase("rtl_connector")
|
|
|
|
|
.setMappings({"bias_tee": Flag("-b"), "direct_sampling": Option("-e")})
|
2020-03-26 13:33:32 +01:00
|
|
|
)
|
2021-02-19 14:44:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class RtlSdrDeviceDescription(SdrDeviceDescription):
|
|
|
|
|
def getInputs(self) -> List[Input]:
|
|
|
|
|
return [
|
|
|
|
|
TextInput(
|
|
|
|
|
"test",
|
|
|
|
|
"This is a drill"
|
|
|
|
|
),
|
|
|
|
|
]
|