1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

Merge pull request #304 from dl3yc/master

implement networked PlutoSDR
This commit is contained in:
f4exb 2019-03-02 20:04:28 +01:00 committed by GitHub
commit 5e64a98dca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,6 +49,18 @@ void DevicePlutoSDRScan::scan()
m_scans.clear();
if (num_contexts == 0)
{
struct iio_context *ctx = iio_create_network_context("pluto.local");
if(!ctx) {
return;
}
m_scans.push_back({std::string("PlutoSDR"), std::string("networked"), std::string("ip:pluto.local")});
m_serialMap[m_scans.back().m_serial] = &m_scans.back();
m_urilMap[m_scans.back().m_uri] = &m_scans.back();
iio_context_destroy(ctx);
}
for (i = 0; i < num_contexts; i++)
{
const char *description = iio_context_info_get_description(info[i]);
@ -121,5 +133,3 @@ void DevicePlutoSDRScan::getSerials(std::vector<std::string>& serials) const
}
}