Skip to content

Commit

Permalink
Missing support module detection / info popup
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcliffe committed Dec 8, 2015
1 parent 4ca7444 commit 68f0a98
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/CubicSDR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}


Expand Down
4 changes: 4 additions & 0 deletions src/sdr/SDREnumerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 68f0a98

Please sign in to comment.