From d8d158c1008ce1604c57a8b75a116668d1a9201f Mon Sep 17 00:00:00 2001 From: "Michal Krenek (Mikos)" Date: Tue, 21 Mar 2017 16:39:26 +0100 Subject: [PATCH] Make QSpectrumAnalyzer compatible with latest soapy_power 1.5.0 --- PKGBUILD | 2 +- qspectrumanalyzer/backends/hackrf_sweep.py | 2 +- qspectrumanalyzer/backends/soapy_power.py | 2 +- setup.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index e21918d..a9b9447 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -6,7 +6,7 @@ pkgdesc="Spectrum analyzer for multiple SDR platforms (PyQtGraph based GUI for s arch=('any') url="https://github.com/xmikos/qspectrumanalyzer" license=('GPL3') -depends=('python-qt.py' 'python-pyqt5' 'python-pyqtgraph' 'soapy_power') +depends=('python-qt.py' 'python-pyqt5' 'python-pyqtgraph' 'soapy_power>=1.5.0') makedepends=('python-setuptools') optdepends=( 'rtl_power_fftw-git: alternative RTL-SDR backend using FFTW library (much faster than rtl_power)' diff --git a/qspectrumanalyzer/backends/hackrf_sweep.py b/qspectrumanalyzer/backends/hackrf_sweep.py index 85cf19b..706858b 100644 --- a/qspectrumanalyzer/backends/hackrf_sweep.py +++ b/qspectrumanalyzer/backends/hackrf_sweep.py @@ -106,7 +106,7 @@ class PowerThread(BasePowerThread): if additional_params: cmdline.extend(shlex.split(additional_params)) - self.process = subprocess.Popen(cmdline, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, + self.process = subprocess.Popen(cmdline, stdout=subprocess.PIPE, universal_newlines=False) def parse_output(self, buf): diff --git a/qspectrumanalyzer/backends/soapy_power.py b/qspectrumanalyzer/backends/soapy_power.py index 25483c4..e57c4ab 100644 --- a/qspectrumanalyzer/backends/soapy_power.py +++ b/qspectrumanalyzer/backends/soapy_power.py @@ -68,7 +68,7 @@ class PowerThread(BasePowerThread): "bin_size": bin_size, "interval": interval, "hops": 0, - "gain": gain * 10, + "gain": gain, "ppm": ppm, "crop": crop * 100, "single_shot": single_shot diff --git a/setup.py b/setup.py index ea25e6a..a48c4d1 100755 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ setup( ], }, install_requires=[ - "soapy_power>=1.4.0", + "soapy_power>=1.5.0", "pyqtgraph>=0.10.0", "Qt.py" ],