mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-26 20:37:50 +02:00
bunch of bugfix and new features
This commit is contained in:
@ -30,8 +30,6 @@ public:
|
||||
this->name = name;
|
||||
|
||||
sampleRate = 8000000.0;
|
||||
// TODO: REMOVE
|
||||
samplerates.define(8000000, "8MHz", 8000000.0);
|
||||
|
||||
handler.ctx = this;
|
||||
handler.selectHandler = menuSelected;
|
||||
@ -42,15 +40,6 @@ public:
|
||||
handler.tuneHandler = tune;
|
||||
handler.stream = &stream;
|
||||
|
||||
// List devices
|
||||
refresh();
|
||||
|
||||
// Select device
|
||||
config.acquire();
|
||||
selectedSer = config.conf["device"];
|
||||
config.release();
|
||||
select(selectedSer);
|
||||
|
||||
sigpath::sourceManager.registerSource("USRP", &handler);
|
||||
}
|
||||
|
||||
@ -212,6 +201,20 @@ private:
|
||||
|
||||
static void menuSelected(void* ctx) {
|
||||
USRPSourceModule* _this = (USRPSourceModule*)ctx;
|
||||
|
||||
if (_this->firstSelect) {
|
||||
_this->firstSelect = false;
|
||||
|
||||
// List devices
|
||||
_this->refresh();
|
||||
|
||||
// Select device
|
||||
config.acquire();
|
||||
_this->selectedSer = config.conf["device"];
|
||||
config.release();
|
||||
_this->select(_this->selectedSer);
|
||||
}
|
||||
|
||||
core::setInputSampleRate(_this->sampleRate);
|
||||
spdlog::info("USRPSourceModule '{0}': Menu Select!", _this->name);
|
||||
}
|
||||
@ -406,6 +409,8 @@ private:
|
||||
uhd::usrp::multi_usrp::sptr dev;
|
||||
uhd::rx_streamer::sptr streamer;
|
||||
|
||||
bool firstSelect = true;
|
||||
|
||||
std::thread workerThread;
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user