From 70ba0cd618f17c784ecfd91743aff8450464bb4c Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Wed, 1 Apr 2020 23:37:40 +0200 Subject: [PATCH] add direct_sampling mapping for rtl_sdr --- CHANGELOG.md | 1 + debian/changelog | 1 + owrx/source/rtl_sdr.py | 13 +++++++------ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 802c4a5..e5ae9f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - FiFi SDR: prevent arecord from shutting down after 2GB of data has been sent - Added support for bias tee control on rtl_sdr devices - All connector driven SDRs now support `"rf_gain": "auto"` to enable AGC +- `rtl_sdr` type now also supports the `direct_sampling` option **0.18.0** - Support for SoapyRemote diff --git a/debian/changelog b/debian/changelog index af78450..ded59bd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,7 @@ openwebrx (0.19.0) UNRELEASED; urgency=low sent * Added support for bias tee control on rtl_sdr devices * All connector driven SDRs now support `"rf_gain": "auto"` to enable AGC + * `rtl_sdr` type now also supports the `direct_sampling` option -- Jakob Ketterl Thu, 20 Feb 2020 21:01:00 +0000 diff --git a/owrx/source/rtl_sdr.py b/owrx/source/rtl_sdr.py index bc7c523..ab7b40c 100644 --- a/owrx/source/rtl_sdr.py +++ b/owrx/source/rtl_sdr.py @@ -1,14 +1,15 @@ from .connector import ConnectorSource -from owrx.command import Flag +from owrx.command import Flag, Option class RtlSdrSource(ConnectorSource): def getCommandMapper(self): - return super().getCommandMapper().setBase("rtl_connector").setMappings( - { - "bias_tee": Flag("-b") - } + return ( + super() + .getCommandMapper() + .setBase("rtl_connector") + .setMappings({"bias_tee": Flag("-b"), "direct_sampling": Option("-e")}) ) def getEventNames(self): - return super().getEventNames() + ["bias_tee"] + return super().getEventNames() + ["bias_tee", "direct_sampling"]