mirror of
https://github.com/jketterl/openwebrx.git
synced 2025-12-06 07:12:09 +01:00
perform soapy driver feature checks using soapy_connector
This commit is contained in:
parent
949437c662
commit
28ccf2e6f2
2
debian/control
vendored
2
debian/control
vendored
|
|
@ -10,7 +10,7 @@ Vcs-Git: https://github.com/jketterl/openwebrx.git
|
||||||
|
|
||||||
Package: openwebrx
|
Package: openwebrx
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: adduser, python3 (>= 3.5), python3-pkg-resources, owrx-connector (>= 0.5), soapysdr-tools, python3-csdr (>= 0.18), ${python3:Depends}, ${misc:Depends}
|
Depends: adduser, python3 (>= 3.5), python3-pkg-resources, owrx-connector (>= 0.7), python3-csdr (>= 0.18), ${python3:Depends}, ${misc:Depends}
|
||||||
Recommends: python3-digiham (>= 0.6), direwolf (>= 1.4), wsjtx, js8call, runds-connector (>= 0.2), hpsdrconnector, aprs-symbols, m17-demod, js8call, python3-js8py (>= 0.2), nmux (>= 0.18), codecserver (>= 0.1), msk144decoder
|
Recommends: python3-digiham (>= 0.6), direwolf (>= 1.4), wsjtx, js8call, runds-connector (>= 0.2), hpsdrconnector, aprs-symbols, m17-demod, js8call, python3-js8py (>= 0.2), nmux (>= 0.18), codecserver (>= 0.1), msk144decoder
|
||||||
Description: multi-user web sdr
|
Description: multi-user web sdr
|
||||||
Open source, multi-user SDR receiver with a web interface
|
Open source, multi-user SDR receiver with a web interface
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ apt-get update
|
||||||
apt-get -y install --no-install-recommends $BUILD_PACKAGES
|
apt-get -y install --no-install-recommends $BUILD_PACKAGES
|
||||||
|
|
||||||
git clone https://github.com/jketterl/owrx_connector.git
|
git clone https://github.com/jketterl/owrx_connector.git
|
||||||
# latest develop as of 2022-12-11 (std::endl implicit flushing)
|
# latest develop as of 2023-03-18 (added --listdriver option)
|
||||||
cmakebuild owrx_connector bca362707131289f91441c8080fd368fdc067b6d
|
cmakebuild owrx_connector beda260363c0e77617d4e17ef864e1f5c3fd86b2
|
||||||
|
|
||||||
apt-get -y purge --autoremove $BUILD_PACKAGES
|
apt-get -y purge --autoremove $BUILD_PACKAGES
|
||||||
apt-get clean
|
apt-get clean
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ class FeatureDetector(object):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _check_owrx_connector(self, command):
|
def _check_owrx_connector(self, command):
|
||||||
return self._check_connector(command, LooseVersion("0.5"))
|
return self._check_connector(command, LooseVersion("0.7"))
|
||||||
|
|
||||||
def has_rtl_connector(self):
|
def has_rtl_connector(self):
|
||||||
"""
|
"""
|
||||||
|
|
@ -293,14 +293,10 @@ class FeatureDetector(object):
|
||||||
|
|
||||||
def _has_soapy_driver(self, driver):
|
def _has_soapy_driver(self, driver):
|
||||||
try:
|
try:
|
||||||
process = subprocess.Popen(["SoapySDRUtil", "--info"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
|
process = subprocess.Popen(["soapy_connector", "--listdrivers"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
|
||||||
factory_regex = re.compile("^Available factories\\.\\.\\. ?(.*)$")
|
|
||||||
|
|
||||||
drivers = []
|
drivers = [line.decode().strip() for line in process.stdout]
|
||||||
for line in process.stdout:
|
process.wait(1)
|
||||||
matches = factory_regex.match(line.decode())
|
|
||||||
if matches:
|
|
||||||
drivers = [s.strip() for s in matches.group(1).split(", ")]
|
|
||||||
|
|
||||||
return driver in drivers
|
return driver in drivers
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue