Skip to content

Commit

Permalink
Make soapy_power compatible with latest simplesoapy version
Browse files Browse the repository at this point in the history
  • Loading branch information
xmikos committed Apr 26, 2017
1 parent 35adfbb commit 46e1265
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Maintainer: Michal Krenek (Mikos) <[email protected]>
pkgname=soapy_power
pkgver=1.6.0
pkgver=1.6.1
pkgrel=1
pkgdesc="Obtain power spectrum from SoapySDR devices (RTL-SDR, Airspy, SDRplay, HackRF, bladeRF, USRP, LimeSDR, etc.)"
arch=('any')
url="https://github.com/xmikos/soapy_power"
license=('MIT')
depends=('python' 'python-numpy' 'simplesoapy>=1.4.0' 'simplespectral')
depends=('python' 'python-numpy' 'simplesoapy>=1.5.0' 'simplespectral')
makedepends=('python-setuptools')
optdepends=(
'soapyrtlsdr-git: support for RTL-SDR (RTL2832U) dongles'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
install_requires=[
'numpy',
'simplesoapy>=1.4.0',
'simplesoapy>=1.5.0',
'simplespectral'
],
classifiers=[
Expand Down
8 changes: 7 additions & 1 deletion soapypower/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,13 @@ def device_info(soapy_args=''):
text.append(' Allowed frequency range [MHz]:')
text.append(' {:.2f} - {:.2f}'.format(*[x / 1e6 for x in device.get_frequency_range()]))
text.append(' Allowed sample rates [MHz]:')
text.append(wrap(', '.join('{:.2f}'.format(x / 1e6) for x in device.list_sample_rates())))
rates = []
for r in device.list_sample_rates():
if r[0] == r[1]:
rates.append('{:.2f}'.format(r[0] / 1e6))
else:
rates.append('{:.2f} - {:.2f}'.format(r[0] / 1e6, r[1] / 1e6))
text.append(wrap(', '.join(rates)))
text.append(' Allowed bandwidths [MHz]:')
bandwidths = []
for b in device.list_bandwidths():
Expand Down
2 changes: 1 addition & 1 deletion soapypower/power.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import numpy
import simplesoapy
from simplespectral import empty, zeros
from simplespectral import zeros

from soapypower import psd, writer

Expand Down
2 changes: 1 addition & 1 deletion soapypower/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.6.0'
__version__ = '1.6.1'

0 comments on commit 46e1265

Please sign in to comment.