mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-08-14 15:33:41 -04:00
Add 'Refresh' button to SDR Devices dialog
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user