Soapy bundle option; requires SoapySDR/loader_work

This commit is contained in:
Charles J. Cliffe
2015-10-29 22:22:10 -04:00
parent 798c558c09
commit a1b73403a7
3 changed files with 51 additions and 19 deletions
+13 -1
View File
@@ -46,7 +46,19 @@ std::vector<SDRDeviceInfo *> *SDREnumerator::enumerate_devices(std::string remot
}
std::cout << "\tLoading modules... " << std::flush;
SoapySDR::loadModules();
#ifdef BUNDLE_SOAPY_MODS
wxFileName exePath = wxFileName(wxStandardPaths::Get().GetExecutablePath());
std::vector<std::string> localMods = SoapySDR::listModules(exePath.GetPath().ToStdString() + "/modules/");
for (std::vector<std::string>::iterator mods_i = localMods.begin(); mods_i != localMods.end(); mods_i++) {
wxGetApp().sdrEnumThreadNotify(SDREnumerator::SDR_ENUM_MESSAGE, "Initializing bundled SoapySDR module " + (*mods_i) + "..");
SoapySDR::loadModule(*mods_i);
}
wxGetApp().sdrEnumThreadNotify(SDREnumerator::SDR_ENUM_MESSAGE, "Loading SoapySDR modules..");
SoapySDR::loadModules();
#else
SoapySDR::loadModules();
#endif
std::cout << "done" << std::endl;
if (SDREnumerator::factories.size()) {
+1 -1
View File
@@ -81,7 +81,7 @@ void SDRThread::init() {
if (chan->hasHardwareDC()) {
hasHardwareDC.store(true);
// wxGetApp().sdrEnumThreadNotify(SDREnumerator::SDR_ENUM_MESSAGE, std::string("Found hardware DC offset correction support, internal disabled."));
device->setDCOffsetMode(SOAPY_SDR_RX, chan->getChannel(), true);
device->setDCOffsetMode(SOAPY_SDR_RX, chan->getChannel(), false);
} else {
hasHardwareDC.store(false);
}