Add 'Refresh' button to SDR Devices dialog

This commit is contained in:
Charles J. Cliffe
2016-01-17 21:54:22 -05:00
parent cec4f7aed1
commit 448455a69f
10 changed files with 146 additions and 12 deletions
+7
View File
@@ -326,3 +326,10 @@ std::vector<std::string> &SDREnumerator::getRemotes() {
bool SDREnumerator::hasRemoteModule() {
return SDREnumerator::has_remote;
}
void SDREnumerator::reset() {
soapy_initialized = false;
factories.erase(factories.begin(), factories.end());
modules.erase(modules.begin(), modules.end());
devs.erase(devs.begin(), devs.end());
}
+1
View File
@@ -29,6 +29,7 @@ public:
static void removeRemote(std::string remoteAddr);
static std::vector<std::string> &getRemotes();
static bool hasRemoteModule();
static void reset();
protected:
static bool soapy_initialized, has_remote;
+5 -1
View File
@@ -337,7 +337,11 @@ SDRDeviceInfo *SDRThread::getDevice() {
void SDRThread::setDevice(SDRDeviceInfo *dev) {
deviceInfo.store(dev);
deviceConfig.store(wxGetApp().getConfig()->getDevice(dev->getDeviceId()));
if (dev) {
deviceConfig.store(wxGetApp().getConfig()->getDevice(dev->getDeviceId()));
} else {
deviceConfig.store(nullptr);
}
}
int SDRThread::getOptimalElementCount(long long sampleRate, int fps) {