Missing support module detection / info popup

This commit is contained in:
Charles J. Cliffe 2015-12-07 22:05:31 -05:00
parent 4ca7444176
commit 68f0a986ee
2 changed files with 10 additions and 4 deletions

View File

@ -403,12 +403,14 @@ void CubicSDR::sdrEnumThreadNotify(SDREnumerator::SDREnumState state, std::strin
devs = SDREnumerator::enumerate_devices("", true);
devicesReady.store(true);
}
if (state == SDREnumerator::SDR_ENUM_FAILED) {
notifyMessage = message;
sdrEnum->terminate();
}
//if (appframe) { appframe->SetStatusText(message); }
notify_busy.unlock();
if (state == SDREnumerator::SDR_ENUM_FAILED) {
wxMessageDialog *info;
info = new wxMessageDialog(NULL, wxT("\nNo SoapySDR modules were found.\n\nCubicSDR requires at least one SoapySDR device support module to be installed.\n\nPlease visit https://github.com/cjcliffe/CubicSDR/wiki and in the build instructions for your platform read the 'Support Modules' section for more information."), wxT("\x28\u256F\xB0\u25A1\xB0\uFF09\u256F\uFE35\x20\u253B\u2501\u253B"), wxOK | wxICON_ERROR);
info->ShowModal();
}
}

View File

@ -105,6 +105,10 @@ std::vector<SDRDeviceInfo *> *SDREnumerator::enumerate_devices(std::string remot
if (factories.empty()) {
std::cout << "No factories found!" << std::endl;
}
if ((factories.size() == 1) && factories.find("null") != factories.end()) {
std::cout << "Just 'null' factory found." << std::endl;
wxGetApp().sdrEnumThreadNotify(SDREnumerator::SDR_ENUM_FAILED, std::string("No modules available."));
}
std::cout << std::endl;
soapy_initialized = true;
}