Fix typo aquire -> acquire

https://en.wiktionary.org/wiki/aquire
This commit is contained in:
Maxime Biette 2021-07-09 14:24:07 -04:00
parent 91c6823e0c
commit ac04432453
45 changed files with 234 additions and 234 deletions

View File

@ -46,7 +46,7 @@ public:
}
// Select device from config
config.aquire();
config.acquire();
std::string devSerial = config.conf["device"];
config.release();
selectByString(devSerial);
@ -142,7 +142,7 @@ public:
selectedSerStr = std::string(buf);
// Load config here
config.aquire();
config.acquire();
bool created = false;
if (!config.conf["devices"].contains(selectedSerStr)) {
created = true;
@ -323,7 +323,7 @@ private:
_this->selectBySerial(_this->devList[_this->devId]);
core::setInputSampleRate(_this->sampleRate);
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["device"] = _this->selectedSerStr;
config.release(true);
}
@ -333,7 +333,7 @@ private:
_this->sampleRate = _this->sampleRateList[_this->srId];
core::setInputSampleRate(_this->sampleRate);
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["sampleRate"] = _this->sampleRate;
config.release(true);
}
@ -343,7 +343,7 @@ private:
float refreshBtnWdith = menuWidth - ImGui::GetCursorPosX();
if (ImGui::Button(CONCAT("Refresh##_airspy_refr_", _this->name), ImVec2(refreshBtnWdith, 0))) {
_this->refresh();
config.aquire();
config.acquire();
std::string devSerial = config.conf["device"];
config.release();
_this->selectByString(devSerial);
@ -362,7 +362,7 @@ private:
airspy_set_sensitivity_gain(_this->openDev, _this->sensitiveGain);
}
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["gainMode"] = 0;
config.release(true);
}
@ -376,7 +376,7 @@ private:
airspy_set_linearity_gain(_this->openDev, _this->linearGain);
}
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["gainMode"] = 1;
config.release(true);
}
@ -402,7 +402,7 @@ private:
airspy_set_vga_gain(_this->openDev, _this->vgaGain);
}
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["gainMode"] = 2;
config.release(true);
}
@ -421,7 +421,7 @@ private:
airspy_set_sensitivity_gain(_this->openDev, _this->sensitiveGain);
}
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["sensitiveGain"] = _this->sensitiveGain;
config.release(true);
}
@ -436,7 +436,7 @@ private:
airspy_set_linearity_gain(_this->openDev, _this->linearGain);
}
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["linearGain"] = _this->linearGain;
config.release(true);
}
@ -456,7 +456,7 @@ private:
airspy_set_lna_gain(_this->openDev, _this->lnaGain);
}
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["lnaGain"] = _this->lnaGain;
config.release(true);
}
@ -473,7 +473,7 @@ private:
airspy_set_mixer_gain(_this->openDev, _this->mixerGain);
}
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["mixerGain"] = _this->mixerGain;
config.release(true);
}
@ -489,7 +489,7 @@ private:
airspy_set_vga_gain(_this->openDev, _this->vgaGain);
}
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["vgaGain"] = _this->vgaGain;
config.release(true);
}
@ -507,7 +507,7 @@ private:
}
}
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["lnaAgc"] = _this->lnaAgc;
config.release(true);
}
@ -523,7 +523,7 @@ private:
}
}
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["mixerAgc"] = _this->mixerAgc;
config.release(true);
}
@ -537,7 +537,7 @@ private:
airspy_set_rf_bias(_this->openDev, _this->biasT);
}
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["biasT"] = _this->biasT;
config.release(true);
}

View File

@ -42,7 +42,7 @@ public:
refresh();
config.aquire();
config.acquire();
std::string devSerial = config.conf["device"];
config.release();
selectByString(devSerial);
@ -145,7 +145,7 @@ public:
selectedSerStr = std::string(buf);
// Load config here
config.aquire();
config.acquire();
bool created = false;
if (!config.conf["devices"].contains(selectedSerStr)) {
created = true;
@ -276,7 +276,7 @@ private:
_this->selectBySerial(_this->devList[_this->devId]);
core::setInputSampleRate(_this->sampleRate);
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["device"] = _this->selectedSerStr;
config.release(true);
}
@ -286,7 +286,7 @@ private:
_this->sampleRate = _this->sampleRateList[_this->srId];
core::setInputSampleRate(_this->sampleRate);
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["sampleRate"] = _this->sampleRate;
config.release(true);
}
@ -296,7 +296,7 @@ private:
float refreshBtnWdith = menuWidth - ImGui::GetCursorPosX();
if (ImGui::Button(CONCAT("Refresh##_airspyhf_refr_", _this->name), ImVec2(refreshBtnWdith, 0))) {
_this->refresh();
config.aquire();
config.acquire();
std::string devSerial = config.conf["device"];
config.release();
_this->selectByString(devSerial);
@ -316,7 +316,7 @@ private:
}
}
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["agcMode"] = _this->agcMode;
config.release(true);
}
@ -329,7 +329,7 @@ private:
airspyhf_set_hf_lna(_this->openDev, _this->hfLNA);
}
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["lna"] = _this->hfLNA;
config.release(true);
}
@ -343,7 +343,7 @@ private:
airspyhf_set_hf_att(_this->openDev, _this->atten / 6.0f);
}
if (_this->selectedSerStr != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerStr]["attenuation"] = _this->atten;
config.release(true);
}

View File

@ -33,7 +33,7 @@ public:
bool created = false;
std::string device = "";
config.aquire();
config.acquire();
if (!config.conf.contains(_streamName)) {
created = true;
config.conf[_streamName]["device"] = "";
@ -95,7 +95,7 @@ public:
void selectById(int id) {
devId = id;
bool created = false;
config.aquire();
config.acquire();
if (!config.conf[_streamName]["devices"].contains(devList[id].name)) {
created = true;
config.conf[_streamName]["devices"][devList[id].name] = devList[id].preferredSampleRate;
@ -138,7 +138,7 @@ public:
ImGui::SetNextItemWidth(menuWidth);
if (ImGui::Combo(("##_audio_sink_dev_"+_streamName).c_str(), &devId, txtDevList.c_str())) {
selectById(devId);
config.aquire();
config.acquire();
config.conf[_streamName]["device"] = devList[devId].name;
config.release(true);
}
@ -151,7 +151,7 @@ public:
doStop();
doStart();
}
config.aquire();
config.acquire();
config.conf[_streamName]["devices"][devList[devId].name] = sampleRate;
config.release(true);
}

View File

@ -46,7 +46,7 @@ public:
refresh();
// Select device here
config.aquire();
config.acquire();
std::string serial = config.conf["device"];
config.release();
selectBySerial(serial);
@ -129,7 +129,7 @@ public:
// Load the channelId if there are more than 1 channel
if (reloadChannelId) {
config.aquire();
config.acquire();
if (channelCount > 1 && config.conf["devices"].contains(info->serial)) {
if (config.conf["devices"][info->serial].contains("channelId")) {
chanId = config.conf["devices"][info->serial]["channelId"];
@ -200,7 +200,7 @@ public:
}
// Load settings here
config.aquire();
config.acquire();
if (!config.conf["devices"].contains(selectedSerial)) {
config.conf["devices"][info->serial]["channelId"] = 0;
@ -400,7 +400,7 @@ private:
bladerf_devinfo info = _this->devInfoList[_this->devId];
_this->selectByInfo(&info);
core::setInputSampleRate(_this->sampleRate);
config.aquire();
config.acquire();
config.conf["device"] = _this->selectedSerial;
config.release(true);
}
@ -409,7 +409,7 @@ private:
_this->sampleRate = _this->sampleRates[_this->srId];
core::setInputSampleRate(_this->sampleRate);
if (_this->selectedSerial != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerial]["sampleRate"] = _this->sampleRates[_this->srId];
config.release(true);
}
@ -431,7 +431,7 @@ private:
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
ImGui::Combo(CONCAT("##_balderf_ch_sel_", _this->name), &_this->chanId, _this->channelNamesTxt.c_str());
if (_this->selectedSerial != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerial]["channelId"] = _this->chanId;
config.release(true);
}
@ -448,7 +448,7 @@ private:
std::clamp<uint64_t>(_this->sampleRate, _this->bwRange->min, _this->bwRange->max) : _this->bandwidths[_this->bwId], NULL);
}
if (_this->selectedSerial != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerial]["bandwidth"] = _this->bwId;
config.release(true);
}
@ -467,7 +467,7 @@ private:
bladerf_set_gain(_this->openDev, BLADERF_CHANNEL_RX(_this->chanId), _this->overallGain);
}
if (_this->selectedSerial != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerial]["gainMode"] = _this->gainModeNames[_this->gainMode];
config.release(true);
}
@ -483,7 +483,7 @@ private:
bladerf_set_gain(_this->openDev, BLADERF_CHANNEL_RX(_this->chanId), _this->overallGain);
}
if (_this->selectedSerial != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerial]["overallGain"] = _this->overallGain;
config.release(true);
}

View File

@ -66,7 +66,7 @@ void ConfigManager::disableAutoSave() {
}
}
void ConfigManager::aquire() {
void ConfigManager::acquire() {
mtx.lock();
}

View File

@ -16,7 +16,7 @@ public:
void save(bool lock = true);
void enableAutoSave();
void disableAutoSave();
void aquire();
void acquire();
void release(bool changed = false);
json conf;

View File

@ -213,8 +213,8 @@ int sdrpp_main(int argc, char *argv[]) {
core::configManager.load(defConfig);
core::configManager.enableAutoSave();
core::configManager.aquire();
core::configManager.acquire();
// Fix missing elements in config
for (auto const& item : defConfig.items()) {
if (!core::configManager.conf.contains(item.key())) {
@ -253,8 +253,8 @@ int sdrpp_main(int argc, char *argv[]) {
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
#endif
core::configManager.aquire();
core::configManager.acquire();
int winWidth = core::configManager.conf["windowSize"]["w"];
int winHeight = core::configManager.conf["windowSize"]["h"];
maximized = core::configManager.conf["maximized"];
@ -375,7 +375,7 @@ int sdrpp_main(int argc, char *argv[]) {
if (_maximized != maximized) {
_maximized = maximized;
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["maximized"]= _maximized;
if (!maximized) {
glfwSetWindowSize(core::window, core::configManager.conf["windowSize"]["w"], core::configManager.conf["windowSize"]["h"]);
@ -405,7 +405,7 @@ int sdrpp_main(int argc, char *argv[]) {
if ((_winWidth != winWidth || _winHeight != winHeight) && !maximized && _winWidth > 0 && _winHeight > 0) {
winWidth = _winWidth;
winHeight = _winHeight;
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["windowSize"]["w"] = winWidth;
core::configManager.conf["windowSize"]["h"] = winHeight;
core::configManager.release(true);

View File

@ -70,7 +70,7 @@ namespace dsp {
while (run() >= 0);
}
void aquire() {
void acquire() {
ctrlMtx.lock();
}

View File

@ -44,7 +44,7 @@ void MainWindow::init() {
credits::init();
core::configManager.aquire();
core::configManager.acquire();
json menuElements = core::configManager.conf["menuElements"];
std::string modulesDir = core::configManager.conf["modulesDirectory"];
std::string resourcesDir = core::configManager.conf["resourcesDirectory"];
@ -109,7 +109,7 @@ void MainWindow::init() {
}
// Read module config
core::configManager.aquire();
core::configManager.acquire();
std::vector<std::string> modules = core::configManager.conf["modules"];
std::map<std::string, std::string> modList = core::configManager.conf["moduleInstances"];
core::configManager.release();
@ -162,7 +162,7 @@ void MainWindow::init() {
// Update UI settings
LoadingScreen::show("Loading configuration");
core::configManager.aquire();
core::configManager.acquire();
fftMin = core::configManager.conf["min"];
fftMax = core::configManager.conf["max"];
gui::waterfall.setFFTMin(fftMin);
@ -223,7 +223,7 @@ void MainWindow::fftHandler(dsp::complex_t* samples, int count, void* ctx) {
void MainWindow::vfoAddedHandler(VFOManager::VFO* vfo, void* ctx) {
MainWindow* _this = (MainWindow*)ctx;
std::string name = vfo->getName();
core::configManager.aquire();
core::configManager.acquire();
if (!core::configManager.conf["vfoOffsets"].contains(name)) {
core::configManager.release();
return;
@ -249,7 +249,7 @@ void MainWindow::draw() {
}
gui::freqSelect.setFrequency(gui::waterfall.getCenterFrequency() + vfo->generalOffset);
gui::freqSelect.frequencyChanged = false;
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["vfoOffsets"][gui::waterfall.selectedVFO] = vfo->generalOffset;
core::configManager.release(true);
}
@ -273,7 +273,7 @@ void MainWindow::draw() {
vfo->lowerOffsetChanged = false;
vfo->upperOffsetChanged = false;
}
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["frequency"] = gui::waterfall.getCenterFrequency();
if (vfo != NULL) {
core::configManager.conf["vfoOffsets"][gui::waterfall.selectedVFO] = vfo->generalOffset;
@ -291,7 +291,7 @@ void MainWindow::draw() {
else {
gui::freqSelect.setFrequency(gui::waterfall.getCenterFrequency());
}
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["frequency"] = gui::waterfall.getCenterFrequency();
core::configManager.release(true);
}
@ -299,7 +299,7 @@ void MainWindow::draw() {
int _fftHeight = gui::waterfall.getFFTHeight();
if (fftHeight != _fftHeight) {
fftHeight = _fftHeight;
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["fftHeight"] = fftHeight;
core::configManager.release(true);
}
@ -314,7 +314,7 @@ void MainWindow::draw() {
ImGui::PushID(ImGui::GetID("sdrpp_menu_btn"));
if (ImGui::ImageButton(icons::MENU, ImVec2(30, 30), ImVec2(0, 0), ImVec2(1, 1), 5) || ImGui::IsKeyPressed(GLFW_KEY_MENU, false)) {
showMenu = !showMenu;
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["showMenu"] = showMenu;
core::configManager.release(true);
}
@ -357,7 +357,7 @@ void MainWindow::draw() {
ImGui::PushID(ImGui::GetID("sdrpp_ena_st_btn"));
if (ImGui::ImageButton(icons::CENTER_TUNING, ImVec2(30, 30), ImVec2(0, 0), ImVec2(1, 1), 5)) {
tuningMode = tuner::TUNER_MODE_NORMAL;
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["centerTuning"] = false;
core::configManager.release(true);
}
@ -368,7 +368,7 @@ void MainWindow::draw() {
if (ImGui::ImageButton(icons::NORMAL_TUNING, ImVec2(30, 30), ImVec2(0, 0), ImVec2(1, 1), 5)) {
tuningMode = tuner::TUNER_MODE_CENTER;
tuner::tune(tuner::TUNER_MODE_CENTER, gui::waterfall.selectedVFO, gui::freqSelect.frequency);
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["centerTuning"] = true;
core::configManager.release(true);
}
@ -421,7 +421,7 @@ void MainWindow::draw() {
if(!down && grabbingMenu) {
grabbingMenu = false;
menuWidth = newWidth;
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["menuWidth"] = menuWidth;
core::configManager.release(true);
}
@ -439,7 +439,7 @@ void MainWindow::draw() {
float menuColumnWidth = ImGui::GetContentRegionAvailWidth();
if (gui::menu.draw(firstMenuRender)) {
core::configManager.aquire();
core::configManager.acquire();
json arr = json::array();
for (int i = 0; i < gui::menu.order.size(); i++) {
arr[i]["name"] = gui::menu.order[i].name;
@ -513,7 +513,7 @@ void MainWindow::draw() {
nfreq = roundl(nfreq / vfo->snapInterval) * vfo->snapInterval;
tuner::tune(tuningMode, gui::waterfall.selectedVFO, nfreq);
}
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["frequency"] = gui::waterfall.getCenterFrequency();
if (vfo != NULL) {
core::configManager.conf["vfoOffsets"][gui::waterfall.selectedVFO] = vfo->generalOffset;
@ -534,7 +534,7 @@ void MainWindow::draw() {
}
tuner::tune(tuningMode, gui::waterfall.selectedVFO, nfreq);
gui::freqSelect.setFrequency(nfreq);
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["frequency"] = gui::waterfall.getCenterFrequency();
if (vfo != NULL) {
core::configManager.conf["vfoOffsets"][gui::waterfall.selectedVFO] = vfo->generalOffset;
@ -563,7 +563,7 @@ void MainWindow::draw() {
ImGui::SetCursorPosX((ImGui::GetWindowSize().x / 2.0) - 10);
if (ImGui::VSliderFloat("##_8_", ImVec2(20.0, 150.0), &fftMax, 0.0, -160.0f, "")) {
fftMax = std::max<float>(fftMax, fftMin + 10);
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["max"] = fftMax;
core::configManager.release(true);
}
@ -575,7 +575,7 @@ void MainWindow::draw() {
ImGui::SetCursorPosX((ImGui::GetWindowSize().x / 2.0) - 10);
if (ImGui::VSliderFloat("##_9_", ImVec2(20.0, 150.0), &fftMin, 0.0, -160.0f, "")) {
fftMin = std::min<float>(fftMax - 10, fftMin);
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["min"] = fftMin;
core::configManager.release(true);
}

View File

@ -38,7 +38,7 @@ namespace bandplanmenu {
ImGui::PushItemWidth(menuColumnWidth);
if (ImGui::Combo("##_bandplan_name_", &bandplanId, bandplan::bandplanNameTxt.c_str())) {
gui::waterfall.bandplan = &bandplan::bandplans[bandplan::bandplanNames[bandplanId]];
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["bandPlan"] = bandplan::bandplanNames[bandplanId];
core::configManager.release(true);
}
@ -49,14 +49,14 @@ namespace bandplanmenu {
ImGui::SetNextItemWidth(menuColumnWidth - ImGui::GetCursorPosX());
if (ImGui::Combo("##_bandplan_pos_", &bandPlanPos, bandPlanPosTxt)) {
gui::waterfall.setBandPlanPos(bandPlanPos);
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["bandPlanPos"] = bandPlanPos;
core::configManager.release(true);
}
if (ImGui::Checkbox("Enabled", &bandPlanEnabled)) {
bandPlanEnabled ? gui::waterfall.showBandplan() : gui::waterfall.hideBandplan();
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["bandPlanEnabled"] = bandPlanEnabled;
core::configManager.release(true);
}

View File

@ -80,21 +80,21 @@ namespace displaymenu {
if (ImGui::Checkbox("Show Waterfall##_sdrpp", &showWaterfall) || ImGui::IsKeyPressed(GLFW_KEY_HOME, false)) {
if (ImGui::IsKeyPressed(GLFW_KEY_HOME, false)) { showWaterfall = !showWaterfall; }
showWaterfall ? gui::waterfall.showWaterfall() : gui::waterfall.hideWaterfall();
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["showWaterfall"] = showWaterfall;
core::configManager.release(true);
}
if (ImGui::Checkbox("Fast FFT##_sdrpp", &fastFFT)) {
gui::waterfall.setFastFFT(fastFFT);
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["fastFFT"] = fastFFT;
core::configManager.release(true);
}
if (ImGui::Checkbox("Full Waterfall Update##_sdrpp", &fullWaterfallUpdate)) {
gui::waterfall.setFullWaterfallUpdate(fullWaterfallUpdate);
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["fullWaterfallUpdate"] = fullWaterfallUpdate;
core::configManager.release(true);
}
@ -104,7 +104,7 @@ namespace displaymenu {
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::Combo("##sdrpp_fft_size", &fftSizeId, FFTSizesStr)) {
gui::mainWindow.setFFTSize(FFTSizes[fftSizeId]);
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["fftSize"] = FFTSizes[fftSizeId];
core::configManager.release(true);
}
@ -114,7 +114,7 @@ namespace displaymenu {
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::Combo("##sdrpp_fft_window", &selectedWindow, "Rectangular\0Blackman\0")) {
gui::mainWindow.setFFTWindow(selectedWindow);
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["fftWindow"] = selectedWindow;
core::configManager.release(true);
}
@ -126,7 +126,7 @@ namespace displaymenu {
if (ImGui::Combo("##_sdrpp_color_map_sel", &colorMapId, colorMapNamesTxt.c_str())) {
colormaps::Map map = colormaps::maps[colorMapNames[colorMapId]];
gui::waterfall.updatePalletteFromArray(map.map, map.entryCount);
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["colorMap"] = colorMapNames[colorMapId];
core::configManager.release(true);
colorMapAuthor = map.author;

View File

@ -4,7 +4,7 @@
namespace sinkmenu {
void init() {
core::configManager.aquire();
core::configManager.acquire();
sigpath::sinkManager.loadSinksFromConfig();
core::configManager.release();
}

View File

@ -43,7 +43,7 @@ namespace sourecmenu {
}
void init() {
core::configManager.aquire();
core::configManager.acquire();
std::string name = core::configManager.conf["source"];
auto it = std::find(sigpath::sourceManager.sourceNames.begin(), sigpath::sourceManager.sourceNames.end(), name);
if (it != sigpath::sourceManager.sourceNames.end()) {
@ -71,11 +71,11 @@ namespace sourecmenu {
float itemWidth = ImGui::GetContentRegionAvailWidth();
if (gui::mainWindow.sdrIsRunning()) { style::beginDisabled(); }
ImGui::SetNextItemWidth(itemWidth);
if (ImGui::Combo("##source", &sourceId, items.c_str())) {
sigpath::sourceManager.selectSource(sigpath::sourceManager.sourceNames[sourceId]);
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["source"] = sigpath::sourceManager.sourceNames[sourceId];
core::configManager.release(true);
}
@ -89,7 +89,7 @@ namespace sourecmenu {
ImGui::SetNextItemWidth(itemWidth - ImGui::GetCursorPosX());
if (ImGui::Combo("##_sdrpp_offset_mode", &offsetMode, offsetModesTxt)) {
updateOffset();
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["offsetMode"] = offsetMode;
core::configManager.release(true);
}
@ -100,7 +100,7 @@ namespace sourecmenu {
if (offsetMode == OFFSET_MODE_CUSTOM) {
if (ImGui::InputDouble("##freq_offset", &customOffset, 1.0, 100.0)) {
updateOffset();
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["offset"] = customOffset;
core::configManager.release(true);
}
@ -110,6 +110,6 @@ namespace sourecmenu {
ImGui::InputDouble("##freq_offset", &effectiveOffset, 1.0, 100.0);
style::endDisabled();
}
}
}
}

View File

@ -11,7 +11,7 @@ namespace thememenu {
void init(std::string resDir) {
// TODO: Not hardcode theme directory
gui::themeManager.loadThemesFromDir(resDir + "/themes/");
core::configManager.aquire();
core::configManager.acquire();
std::string selectedThemeName = core::configManager.conf["theme"];
core::configManager.release();
@ -39,7 +39,7 @@ namespace thememenu {
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::Combo("##theme_select_combo", &themeId, themeNamesTxt.c_str())) {
gui::themeManager.applyTheme(themeNames[themeId]);
core::configManager.aquire();
core::configManager.acquire();
core::configManager.conf["theme"] = themeNames[themeId];
core::configManager.release(true);
}

View File

@ -25,7 +25,7 @@ namespace vfo_color_menu {
void init() {
// Load colors from config
bool modified = false;
core::configManager.aquire();
core::configManager.acquire();
json conf = core::configManager.conf["vfoColors"];
for (auto& [name, val] : conf.items()) {
// If not a string, repair with default
@ -90,7 +90,7 @@ namespace vfo_color_menu {
vfoColors[name] = ImVec4(r, g, b, 1.0f);
vfo->color = IM_COL32((int)roundf(r * 255), (int)roundf(g * 255), (int)roundf(b * 255), 50);
hue += delta;
core::configManager.aquire();
core::configManager.acquire();
char buf[16];
sprintf(buf, "#%02X%02X%02X", (int)roundf(r * 255), (int)roundf(g * 255), (int)roundf(b * 255));
core::configManager.conf["vfoColors"][name] = buf;
@ -103,7 +103,7 @@ namespace vfo_color_menu {
for (auto& [name, vfo] : gui::waterfall.vfos) {
vfoColors[name] = ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
vfo->color = IM_COL32(255, 255, 255, 50);
core::configManager.aquire();
core::configManager.acquire();
char buf[16];
core::configManager.conf["vfoColors"][name] = "#FFFFFF";
core::configManager.release(true);
@ -123,7 +123,7 @@ namespace vfo_color_menu {
if (ImGui::ColorEdit3(("##vfo_color_"+name).c_str(), (float*)&col, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel)) {
vfoColors[name] = col;
vfo->color = IM_COL32((int)roundf(col.x * 255), (int)roundf(col.y * 255), (int)roundf(col.z * 255), 50);
core::configManager.aquire();
core::configManager.acquire();
char buf[16];
sprintf(buf, "#%02X%02X%02X", (int)roundf(col.x * 255), (int)roundf(col.y * 255), (int)roundf(col.z * 255));
core::configManager.conf["vfoColors"][name] = buf;

View File

@ -30,7 +30,7 @@ namespace ImGui {
}
}
dsp::complex_t* ConstellationDiagram::aquireBuffer() {
dsp::complex_t* ConstellationDiagram::acquireBuffer() {
bufferMtx.lock();
return buffer;
}

View File

@ -13,7 +13,7 @@ namespace ImGui {
void draw(const ImVec2& size_arg = ImVec2(0, 0));
dsp::complex_t* aquireBuffer();
dsp::complex_t* acquireBuffer();
void releaseBuffer();

View File

@ -42,7 +42,7 @@ namespace ImGui {
window->DrawList->AddImage((void*)(intptr_t)textureId, min, ImVec2(min.x + width, min.y + height));
}
uint8_t* LinePushImage::aquireNextLine(int count) {
uint8_t* LinePushImage::acquireNextLine(int count) {
bufferMtx.lock();
int oldLineCount = _lineCount;

View File

@ -13,7 +13,7 @@ namespace ImGui {
void draw(const ImVec2& size_arg = ImVec2(0, 0));
uint8_t* aquireNextLine(int count = 1);
uint8_t* acquireNextLine(int count = 1);
void releaseNextLine();

View File

@ -32,7 +32,7 @@ namespace ImGui {
}
}
float* SymbolDiagram::aquireBuffer() {
float* SymbolDiagram::acquireBuffer() {
bufferMtx.lock();
return buffer;
}

View File

@ -12,7 +12,7 @@ namespace ImGui {
void draw(const ImVec2& size_arg = ImVec2(0, 0));
float* aquireBuffer();
float* acquireBuffer();
void releaseBuffer();

View File

@ -110,7 +110,7 @@ void SinkManager::registerStream(std::string name, SinkManager::Stream* stream)
streamNames.push_back(name);
// Load config
core::configManager.aquire();
core::configManager.acquire();
bool available = core::configManager.conf["streams"].contains(name);
core::configManager.release();
if (available) { loadStreamConfig(name); }
@ -206,7 +206,7 @@ void SinkManager::showVolumeSlider(std::string name, std::string prefix, float w
ImGui::PushID(ImGui::GetID(("sdrpp_unmute_btn_" + name).c_str()));
if (ImGui::ImageButton(icons::MUTED, ImVec2(height, height), ImVec2(0, 0), ImVec2(1, 1), btwBorder)) {
stream->volumeAjust.setMuted(false);
core::configManager.aquire();
core::configManager.acquire();
saveStreamConfig(name);
core::configManager.release(true);
}
@ -216,7 +216,7 @@ void SinkManager::showVolumeSlider(std::string name, std::string prefix, float w
ImGui::PushID(ImGui::GetID(("sdrpp_mute_btn_" + name).c_str()));
if (ImGui::ImageButton(icons::UNMUTED, ImVec2(height, height), ImVec2(0, 0), ImVec2(1, 1), btwBorder)) {
stream->volumeAjust.setMuted(true);
core::configManager.aquire();
core::configManager.acquire();
saveStreamConfig(name);
core::configManager.release(true);
}
@ -229,7 +229,7 @@ void SinkManager::showVolumeSlider(std::string name, std::string prefix, float w
ImGui::SetCursorPosY(ypos + ((height - sliderHeight) / 2.0f) + btwBorder);
if (ImGui::SliderFloat((prefix + name).c_str(), &stream->guiVolume, 0.0f, 1.0f, "")) {
stream->setVolume(stream->guiVolume);
core::configManager.aquire();
core::configManager.acquire();
saveStreamConfig(name);
core::configManager.release(true);
}
@ -267,7 +267,7 @@ void SinkManager::saveStreamConfig(std::string name) {
core::configManager.conf["streams"][name] = conf;
}
// Note: aquire and release config before running this
// Note: acquire and release config before running this
void SinkManager::loadSinksFromConfig() {
for (auto const& [name, stream] : streams) {
if (!core::configManager.conf["streams"].contains(name)) { continue; }
@ -301,7 +301,7 @@ void SinkManager::showMenu() {
if (stream->running) {
stream->sink->start();
}
core::configManager.aquire();
core::configManager.acquire();
saveStreamConfig(name);
core::configManager.release(true);
}

View File

@ -204,7 +204,7 @@ private:
static void symSinkHandler(float* data, int count, void* ctx) {
Falcon9DecoderModule* _this = (Falcon9DecoderModule*)ctx;
float* buf = _this->symDiag.aquireBuffer();
float* buf = _this->symDiag.acquireBuffer();
memcpy(buf, data, 1024*sizeof(float));
_this->symDiag.releaseBuffer();
}

View File

@ -25,7 +25,7 @@ public:
FileSourceModule(std::string name) : fileSelect("", {"Wav IQ Files (*.wav)", "*.wav", "All Files", "*"}) {
this->name = name;
config.aquire();
config.acquire();
fileSelect.setPath(config.conf["path"], true);
config.release();
@ -114,7 +114,7 @@ private:
core::setInputSampleRate(_this->sampleRate);
}
catch (std::exception e) {}
config.aquire();
config.acquire();
config.conf["path"] = _this->fileSelect.path;
config.release(true);
}

View File

@ -62,7 +62,7 @@ public:
FrequencyManagerModule(std::string name) {
this->name = name;
config.aquire();
config.acquire();
std::string selList = config.conf["selectedList"];
bookmarkDisplayMode = config.conf["bookmarkDisplayMode"];
config.release();
@ -243,7 +243,7 @@ private:
if (ImGui::Button("Apply")) {
open = false;
config.aquire();
config.acquire();
if (renameListOpen) {
config.conf["lists"][editedListName] = config.conf["lists"][firstEditedListName];
config.conf["lists"].erase(firstEditedListName);
@ -282,7 +282,7 @@ private:
for (auto [listName, list] : config.conf["lists"].items()) {
bool shown = list["showOnWaterfall"];
if (ImGui::Checkbox((listName+"##freq_manager_sel_list_").c_str(), &shown)) {
config.aquire();
config.acquire();
config.conf["lists"][listName]["showOnWaterfall"] = shown;
refreshWaterfallBookmarks(false);
config.release(true);
@ -301,7 +301,7 @@ private:
listNames.clear();
listNamesTxt = "";
config.aquire();
config.acquire();
for (auto [_name, list] : config.conf["lists"].items()) {
listNames.push_back(_name);
listNamesTxt += _name;
@ -311,7 +311,7 @@ private:
}
void refreshWaterfallBookmarks(bool lockConfig = true) {
if (lockConfig) { config.aquire(); }
if (lockConfig) { config.acquire(); }
waterfallBookmarks.clear();
for (auto [listName, list] : config.conf["lists"].items()) {
if (!((bool)list["showOnWaterfall"])) { continue; }
@ -348,7 +348,7 @@ private:
}
selectedListId = std::distance(listNames.begin(), std::find(listNames.begin(), listNames.end(), listName));
selectedListName = listName;
config.aquire();
config.acquire();
for (auto [bmName, bm] : config.conf["lists"][listName]["bookmarks"].items()) {
FrequencyBookmark fbm;
fbm.frequency = bm["frequency"];
@ -361,7 +361,7 @@ private:
}
void saveByName(std::string listName) {
config.aquire();
config.acquire();
config.conf["lists"][listName]["bookmarks"] = json::object();
for (auto [bmName, bm] : bookmarks) {
config.conf["lists"][listName]["bookmarks"][bmName]["frequency"] = bm.frequency;
@ -386,7 +386,7 @@ private:
ImGui::SetNextItemWidth(menuWidth - 24 - (2*lineHeight) - btnSize);
if (ImGui::Combo(("##freq_manager_list_sel"+_this->name).c_str(), &_this->selectedListId, _this->listNamesTxt.c_str())) {
_this->loadByName(_this->listNames[_this->selectedListId]);
config.aquire();
config.acquire();
config.conf["selectedList"] = _this->selectedListName;
config.release(true);
}
@ -418,7 +418,7 @@ private:
if (_this->selectedListName == "") { style::beginDisabled(); }
if (ImGui::Button(("-##_freq_mgr_del_lst_" + _this->name).c_str(), ImVec2(lineHeight, 0))) {
if (_this->selectedListName == "") { style::endDisabled(); }
config.aquire();
config.acquire();
config.conf["lists"].erase(_this->selectedListName);
_this->refreshWaterfallBookmarks(false);
config.release(true);
@ -542,7 +542,7 @@ private:
if (selectedNames.size() == 0 && _this->selectedListName != "") { style::beginDisabled(); }
if (ImGui::Button(("Export##_freq_mgr_exp_" + _this->name).c_str(), ImVec2(ImGui::GetContentRegionAvailWidth(), 0)) && !_this->exportOpen) {
_this->exportedBookmarks = json::object();
config.aquire();
config.acquire();
for (auto& _name : selectedNames) {
_this->exportedBookmarks["bookmarks"][_name] = config.conf["lists"][_this->selectedListName]["bookmarks"][_name];
}
@ -561,7 +561,7 @@ private:
ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::Combo(("##_freq_mgr_dms_" + _this->name).c_str(), &_this->bookmarkDisplayMode, bookmarkDisplayModesTxt)) {
config.aquire();
config.acquire();
config.conf["bookmarkDisplayMode"] = _this->bookmarkDisplayMode;
config.release(true);
}
@ -835,7 +835,7 @@ MOD_EXPORT void _INIT_() {
config.enableAutoSave();
// Check if of list and convert if they're the old type
config.aquire();
config.acquire();
if (!config.conf.contains("bookmarkDisplayMode")) {
config.conf["bookmarkDisplayMode"] = BOOKMARK_DISP_MODE_TOP;
}

View File

@ -95,7 +95,7 @@ public:
refresh();
config.aquire();
config.acquire();
std::string confSerial = config.conf["device"];
config.release();
selectBySerial(confSerial);
@ -151,7 +151,7 @@ public:
}
bool created = false;
config.aquire();
config.acquire();
if (!config.conf["devices"].contains(serial)) {
config.conf["devices"][serial]["sampleRate"] = 2000000;
config.conf["devices"][serial]["biasT"] = false;
@ -280,7 +280,7 @@ private:
ImGui::SetNextItemWidth(menuWidth);
if (ImGui::Combo(CONCAT("##_hackrf_dev_sel_", _this->name), &_this->devId, _this->devListTxt.c_str())) {
_this->selectedSerial = _this->devList[_this->devId];
config.aquire();
config.acquire();
config.conf["device"] = _this->selectedSerial;
config.release(true);
}
@ -288,7 +288,7 @@ private:
if (ImGui::Combo(CONCAT("##_hackrf_sr_sel_", _this->name), &_this->srId, sampleRatesTxt)) {
_this->sampleRate = sampleRates[_this->srId];
core::setInputSampleRate(_this->sampleRate);
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerial]["sampleRate"] = _this->sampleRate;
config.release(true);
}
@ -309,7 +309,7 @@ private:
if (_this->running) {
hackrf_set_baseband_filter_bandwidth(_this->openDev, _this->bandwidthIdToBw(_this->bwId));
}
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerial]["bandwidth"] = _this->bwId;
config.release(true);
}
@ -318,7 +318,7 @@ private:
if (_this->running) {
hackrf_set_antenna_enable(_this->openDev, _this->biasT);
}
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerial]["biasT"] = _this->biasT;
config.release(true);
}
@ -327,7 +327,7 @@ private:
if (_this->running) {
hackrf_set_amp_enable(_this->openDev, _this->amp);
}
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerial]["amp"] = _this->amp;
config.release(true);
}
@ -339,7 +339,7 @@ private:
if (_this->running) {
hackrf_set_lna_gain(_this->openDev, _this->lna);
}
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerial]["lnaGain"] = (int)_this->lna;
config.release(true);
}
@ -351,7 +351,7 @@ private:
if (_this->running) {
hackrf_set_vga_gain(_this->openDev, _this->vga);
}
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedSerial]["vgaGain"] = (int)_this->vga;
config.release(true);
}

View File

@ -127,7 +127,7 @@ public:
channelNamesTxt += '\0';
}
config.aquire();
config.acquire();
if (config.conf["devices"].contains(selectedDevName)) {
if (config.conf["devices"][selectedDevName].contains("channel")) {
chanId = config.conf["devices"][selectedDevName]["channel"];
@ -186,7 +186,7 @@ public:
bandwidthsTxt += "Auto";
bandwidthsTxt += '\0';
config.aquire();
config.acquire();
if (!config.conf["devices"].contains(selectedDevName)) {
config.conf["devices"][selectedDevName]["sampleRate"] = sampleRates[0];
@ -388,7 +388,7 @@ private:
if (ImGui::Combo("##limesdr_dev_sel", &_this->devId, _this->devListTxt.c_str())) {
_this->selectByInfoStr(_this->devList[_this->devId]);
core::setInputSampleRate(_this->sampleRate);
config.aquire();
config.acquire();
config.conf["device"] = _this->selectedDevName;
config.release(true);
}
@ -397,7 +397,7 @@ private:
_this->sampleRate = _this->sampleRates[_this->srId];
core::setInputSampleRate(_this->sampleRate);
if (_this->selectedDevName != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedDevName]["sampleRate"] = _this->sampleRates[_this->srId];
config.release(true);
}
@ -417,7 +417,7 @@ private:
ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::Combo("##limesdr_ch_sel", &_this->chanId, _this->channelNamesTxt.c_str()) && _this->selectedDevName != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedDevName]["channel"] = _this->chanId;
config.release(true);
}
@ -433,7 +433,7 @@ private:
LMS_SetAntenna(_this->openDev, false, _this->chanId, _this->antennaId);
}
if (_this->selectedDevName != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedDevName]["antenna"] = _this->antennaNameList[_this->antennaId];
config.release(true);
}
@ -447,7 +447,7 @@ private:
LMS_SetLPFBW(_this->openDev, false, _this->chanId, (_this->bwId == _this->bandwidths.size()) ? _this->getBestBandwidth(_this->sampleRate) : _this->bandwidths[_this->bwId]);
}
if (_this->selectedDevName != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedDevName]["bandwidth"] = _this->bwId;
config.release(true);
}
@ -461,7 +461,7 @@ private:
LMS_SetGaindB(_this->openDev, false, _this->chanId, _this->gain);
}
if (_this->selectedDevName != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedDevName]["gain"] = _this->gain;
config.release(true);
}

View File

@ -51,7 +51,7 @@ public:
writeBuffer = new int8_t[STREAM_BUFFER_SIZE];
// Load config
config.aquire();
config.acquire();
bool created = false;
if (!config.conf.contains(name)) {
config.conf[name]["recPath"] = "%ROOT%/recordings";
@ -136,7 +136,7 @@ private:
if (_this->folderSelect.render("##meteor-recorder-" + _this->name)) {
if (_this->folderSelect.pathIsValid()) {
config.aquire();
config.acquire();
config.conf[_this->name]["recPath"] = _this->folderSelect.path;
config.release(true);
}
@ -178,7 +178,7 @@ private:
static void symSinkHandler(dsp::complex_t* data, int count, void* ctx) {
MeteorDemodulatorModule* _this = (MeteorDemodulatorModule*)ctx;
dsp::complex_t* buf = _this->constDiagram.aquireBuffer();
dsp::complex_t* buf = _this->constDiagram.acquireBuffer();
memcpy(buf, data, 1024 * sizeof(dsp::complex_t));
_this->constDiagram.releaseBuffer();
}

View File

@ -33,7 +33,7 @@ public:
PlutoSDRSourceModule(std::string name) {
this->name = name;
config.aquire();
config.acquire();
std::string _ip = config.conf["IP"];
strcpy(&ip[3], _ip.c_str());
sampleRate = config.conf["sampleRate"];
@ -160,7 +160,7 @@ private:
ImGui::SameLine();
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::InputText(CONCAT("##_pluto_ip_", _this->name), &_this->ip[3], 16)) {
config.aquire();
config.acquire();
config.conf["IP"] = &_this->ip[3];
config.release(true);
}
@ -172,7 +172,7 @@ private:
if (ImGui::InputFloat(CONCAT("##_samplerate_select_", _this->name), &_this->sampleRate, 1, 1000, 0)) {
_this->sampleRate = std::clamp<float>(_this->sampleRate, 500000, 61000000);
core::setInputSampleRate(_this->sampleRate);
config.aquire();
config.acquire();
config.conf["sampleRate"] = _this->sampleRate;
config.release(true);
}
@ -185,7 +185,7 @@ private:
if (_this->running) {
iio_channel_attr_write(iio_device_find_channel(_this->phy, "voltage0", false), "gain_control_mode", gainModes[_this->gainMode]);
}
config.aquire();
config.acquire();
config.conf["gainMode"] = _this->gainMode;
config.release(true);
}
@ -198,7 +198,7 @@ private:
if (_this->running) {
iio_channel_attr_write_longlong(iio_device_find_channel(_this->phy, "voltage0", false),"hardwaregain", round(_this->gain));
}
config.aquire();
config.acquire();
config.conf["gain"] = _this->gain;
config.release(true);
}

View File

@ -23,7 +23,7 @@ public:
bw = bandWidth;
_config = config;
_config->aquire();
_config->acquire();
if(_config->conf.contains(prefix)) {
if(!_config->conf[prefix].contains("AM")) {
_config->conf[prefix]["AM"]["bandwidth"] = bw;
@ -126,7 +126,7 @@ public:
if (ImGui::InputFloat(("##_radio_am_bw_" + uiPrefix).c_str(), &bw, 1, 100, "%.0f", 0)) {
bw = std::clamp<float>(bw, bwMin, bwMax);
setBandwidth(bw);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["AM"]["bandwidth"] = bw;
_config->release(true);
}
@ -134,7 +134,7 @@ public:
if (_vfo->getBandwidthChanged()) {
bw = _vfo->getBandwidth();
setBandwidth(bw, false);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["AM"]["bandwidth"] = bw;
_config->release(true);
}
@ -146,7 +146,7 @@ public:
if (ImGui::InputFloat(("##_radio_am_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
setSnapInterval(snapInterval);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["AM"]["snapInterval"] = snapInterval;
_config->release(true);
}
@ -156,7 +156,7 @@ public:
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_am_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["AM"]["squelchLevel"] = squelchLevel;
_config->release(true);
}

View File

@ -26,7 +26,7 @@ public:
bw = bandWidth;
_config = config;
_config->aquire();
_config->acquire();
if(_config->conf.contains(prefix)) {
if(!_config->conf[prefix].contains("CW")) {
_config->conf[prefix]["CW"]["bandwidth"] = bw;
@ -134,14 +134,14 @@ public:
if (ImGui::InputFloat(("##_radio_cw_bw_" + uiPrefix).c_str(), &bw, 1, 100, "%.0f", 0)) {
bw = std::clamp<float>(bw, bwMin, bwMax);
setBandwidth(bw);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["CW"]["bandwidth"] = bw;
_config->release(true);
}if (running) {
if (_vfo->getBandwidthChanged()) {
bw = _vfo->getBandwidth();
setBandwidth(bw, false);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["CW"]["bandwidth"] = bw;
_config->release(true);
}
@ -153,7 +153,7 @@ public:
if (ImGui::InputFloat(("##_radio_cw_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
setSnapInterval(snapInterval);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["CW"]["snapInterval"] = snapInterval;
_config->release(true);
}
@ -163,7 +163,7 @@ public:
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_cw_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["CW"]["squelchLevel"] = squelchLevel;
_config->release(true);
}

View File

@ -23,7 +23,7 @@ public:
bw = bandWidth;
_config = config;
_config->aquire();
_config->acquire();
if(_config->conf.contains(prefix)) {
if(!_config->conf[prefix].contains("DSB")) {
_config->conf[prefix]["DSB"]["bandwidth"] = bw;
@ -126,7 +126,7 @@ public:
if (ImGui::InputFloat(("##_radio_dsb_bw_" + uiPrefix).c_str(), &bw, 1, 100, "%.0f", 0)) {
bw = std::clamp<float>(bw, bwMin, bwMax);
setBandwidth(bw);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["DSB"]["bandwidth"] = bw;
_config->release(true);
}
@ -134,7 +134,7 @@ public:
if (_vfo->getBandwidthChanged()) {
bw = _vfo->getBandwidth();
setBandwidth(bw, false);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["DSB"]["bandwidth"] = bw;
_config->release(true);
}
@ -146,7 +146,7 @@ public:
if (ImGui::InputFloat(("##_radio_dsb_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
setSnapInterval(snapInterval);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["DSB"]["snapInterval"] = snapInterval;
_config->release(true);
}
@ -156,7 +156,7 @@ public:
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_dsb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["DSB"]["squelchLevel"] = squelchLevel;
_config->release(true);
}

View File

@ -23,7 +23,7 @@ public:
bw = bandWidth;
_config = config;
_config->aquire();
_config->acquire();
if(_config->conf.contains(prefix)) {
if(!_config->conf[prefix].contains("FM")) {
_config->conf[prefix]["FM"]["bandwidth"] = bw;
@ -118,7 +118,7 @@ public:
if (ImGui::InputFloat(("##_radio_fm_bw_" + uiPrefix).c_str(), &bw, 1, 100, "%.0f", 0)) {
bw = std::clamp<float>(bw, bwMin, bwMax);
setBandwidth(bw);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["FM"]["bandwidth"] = bw;
_config->release(true);
}
@ -126,7 +126,7 @@ public:
if (_vfo->getBandwidthChanged()) {
bw = _vfo->getBandwidth();
setBandwidth(bw, false);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["FM"]["bandwidth"] = bw;
_config->release(true);
}
@ -138,7 +138,7 @@ public:
if (ImGui::InputFloat(("##_radio_fm_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
setSnapInterval(snapInterval);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["FM"]["snapInterval"] = snapInterval;
_config->release(true);
}
@ -148,7 +148,7 @@ public:
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_fm_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["FM"]["squelchLevel"] = squelchLevel;
_config->release(true);
}

View File

@ -23,7 +23,7 @@ public:
bw = bandWidth;
_config = config;
_config->aquire();
_config->acquire();
if(_config->conf.contains(prefix)) {
if(!_config->conf[prefix].contains("LSB")) {
_config->conf[prefix]["LSB"]["bandwidth"] = bw;
@ -126,14 +126,14 @@ public:
if (ImGui::InputFloat(("##_radio_lsb_bw_" + uiPrefix).c_str(), &bw, 1, 100, "%.0f", 0)) {
bw = std::clamp<float>(bw, bwMin, bwMax);
setBandwidth(bw);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["LSB"]["bandwidth"] = bw;
_config->release(true);
}if (running) {
if (_vfo->getBandwidthChanged()) {
bw = _vfo->getBandwidth();
setBandwidth(bw, false);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["LSB"]["bandwidth"] = bw;
_config->release(true);
}
@ -145,7 +145,7 @@ public:
if (ImGui::InputFloat(("##_radio_lsb_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
setSnapInterval(snapInterval);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["LSB"]["snapInterval"] = snapInterval;
_config->release(true);
}
@ -155,7 +155,7 @@ public:
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_lsb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["LSB"]["squelchLevel"] = squelchLevel;
_config->release(true);
}

View File

@ -38,7 +38,7 @@ public:
ns.init(vfo->output);
config.aquire();
config.acquire();
if (!config.conf.contains(name)) {
config.conf[name]["selectedDemodId"] = 1;
}
@ -200,7 +200,7 @@ private:
if (id == 5) { selectDemod(&cwDemod); }
if (id == 6) { selectDemod(&lsbDemod); }
if (id == 7) { selectDemod(&rawDemod); }
config.aquire();
config.acquire();
config.conf[name]["selectedDemodId"] = demodId;
config.release(true);
}

View File

@ -23,7 +23,7 @@ public:
bw = bandWidth;
_config = config;
_config->aquire();
_config->acquire();
if(_config->conf.contains(prefix)) {
if(!_config->conf[prefix].contains("CW")) {
_config->conf[prefix]["CW"]["snapInterval"] = snapInterval;
@ -100,7 +100,7 @@ public:
if (ImGui::InputFloat(("##_radio_raw_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
setSnapInterval(snapInterval);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["RAW"]["snapInterval"] = snapInterval;
_config->release(true);
}
@ -110,7 +110,7 @@ public:
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_raw_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["RAW"]["squelchLevel"] = squelchLevel;
_config->release(true);
}

View File

@ -23,7 +23,7 @@ public:
bw = bandWidth;
_config = config;
_config->aquire();
_config->acquire();
if(_config->conf.contains(prefix)) {
if(!_config->conf[prefix].contains("USB")) {
_config->conf[prefix]["USB"]["bandwidth"] = bw;
@ -126,14 +126,14 @@ public:
if (ImGui::InputFloat(("##_radio_usb_bw_" + uiPrefix).c_str(), &bw, 1, 100, "%.0f", 0)) {
bw = std::clamp<float>(bw, bwMin, bwMax);
setBandwidth(bw);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["USB"]["bandwidth"] = bw;
_config->release(true);
}if (running) {
if (_vfo->getBandwidthChanged()) {
bw = _vfo->getBandwidth();
setBandwidth(bw, false);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["USB"]["bandwidth"] = bw;
_config->release(true);
}
@ -145,7 +145,7 @@ public:
if (ImGui::InputFloat(("##_radio_usb_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
setSnapInterval(snapInterval);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["USB"]["snapInterval"] = snapInterval;
_config->release(true);
}
@ -155,7 +155,7 @@ public:
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_usb_squelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["USB"]["squelchLevel"] = squelchLevel;
_config->release(true);
}

View File

@ -23,7 +23,7 @@ public:
bw = bandWidth;
_config = config;
_config->aquire();
_config->acquire();
if(_config->conf.contains(prefix)) {
if(!_config->conf[prefix].contains("WFM")) {
if (!_config->conf[prefix]["WFM"].contains("bandwidth")) { _config->conf[prefix]["WFM"]["bandwidth"] = bw; }
@ -131,7 +131,7 @@ public:
if (ImGui::InputFloat(("##_radio_wfm_bw_" + uiPrefix).c_str(), &bw, 1, 100, "%.0f", 0)) {
bw = std::clamp<float>(bw, bwMin, bwMax);
setBandwidth(bw);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["WFM"]["bandwidth"] = bw;
_config->release(true);
}
@ -139,7 +139,7 @@ public:
if (_vfo->getBandwidthChanged()) {
bw = _vfo->getBandwidth();
setBandwidth(bw, false);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["WFM"]["bandwidth"] = bw;
_config->release(true);
}
@ -151,7 +151,7 @@ public:
if (ImGui::InputFloat(("##_radio_wfm_snap_" + uiPrefix).c_str(), &snapInterval, 1, 100, "%.0f", 0)) {
if (snapInterval < 1) { snapInterval = 1; }
setSnapInterval(snapInterval);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["WFM"]["snapInterval"] = snapInterval;
_config->release(true);
}
@ -162,7 +162,7 @@ public:
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::Combo(("##_radio_wfm_deemp_" + uiPrefix).c_str(), &deempId, deempModes)) {
setDeempIndex(deempId);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["WFM"]["deempMode"] = deempId;
_config->release(true);
}
@ -172,7 +172,7 @@ public:
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
if (ImGui::SliderFloat(("##_radio_wfm_sqelch_" + uiPrefix).c_str(), &squelchLevel, -100.0f, 0.0f, "%.3fdB")) {
squelch.setLevel(squelchLevel);
_config->aquire();
_config->acquire();
_config->conf[uiPrefix]["WFM"]["squelchLevel"] = squelchLevel;
_config->release(true);
}

View File

@ -50,7 +50,7 @@ public:
this->name = name;
// Load config
config.aquire();
config.acquire();
bool created = false;
// Create config if it doesn't exist
@ -173,14 +173,14 @@ private:
ImGui::Columns(2, CONCAT("AirspyGainModeColumns##_", _this->name), false);
if (ImGui::RadioButton(CONCAT("Baseband##_recmode_", _this->name), _this->recMode == 0)) {
_this->recMode = 0;
config.aquire();
config.acquire();
config.conf[_this->name]["mode"] = _this->recMode;
config.release(true);
}
ImGui::NextColumn();
if (ImGui::RadioButton(CONCAT("Audio##_recmode_", _this->name), _this->recMode == 1)) {
_this->recMode = 1;
config.aquire();
config.acquire();
config.conf[_this->name]["mode"] = _this->recMode;
config.release(true);
}
@ -191,7 +191,7 @@ private:
// Recording path
if (_this->folderSelect.render("##_recorder_fold_" + _this->name)) {
if (_this->folderSelect.pathIsValid()) {
config.aquire();
config.acquire();
config.conf[_this->name]["recPath"] = _this->folderSelect.path;
config.release(true);
}
@ -254,7 +254,7 @@ private:
if (recording) { style::beginDisabled(); }
if (ImGui::Combo(CONCAT("##_recorder_strm_", name), &streamId, streamNamesTxt.c_str())) {
selectStream(streamNames[streamId]);
config.aquire();
config.acquire();
config.conf[name]["audioStream"] = streamNames[streamId];
config.release(true);
}

View File

@ -77,7 +77,7 @@ public:
refresh();
config.aquire();
config.acquire();
if (!config.conf["device"].is_string()) {
selectedDevName = "";
config.conf["device"] = "";
@ -156,7 +156,7 @@ public:
std::sort(gainList.begin(), gainList.end());
bool created = false;
config.aquire();
config.acquire();
if (!config.conf["devices"].contains(selectedDevName)) {
created = true;
config.conf["devices"][selectedDevName]["sampleRate"] = sampleRate;
@ -313,7 +313,7 @@ private:
_this->selectById(_this->devId);
core::setInputSampleRate(_this->sampleRate);
if (_this->selectedDevName != "") {
config.aquire();
config.acquire();
config.conf["device"] = _this->selectedDevName;
config.release(true);
}
@ -323,7 +323,7 @@ private:
_this->sampleRate = sampleRates[_this->srId];
core::setInputSampleRate(_this->sampleRate);
if (_this->selectedDevName != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedDevName]["sampleRate"] = _this->sampleRate;
config.release(true);
}
@ -360,7 +360,7 @@ private:
}
}
if (_this->selectedDevName != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedDevName]["directSampling"] = _this->directSamplingMode;
config.release(true);
}
@ -371,7 +371,7 @@ private:
rtlsdr_set_bias_tee(_this->openDev, _this->biasT);
}
if (_this->selectedDevName != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedDevName]["biasT"] = _this->biasT;
config.release(true);
}
@ -382,7 +382,7 @@ private:
rtlsdr_set_offset_tuning(_this->openDev, _this->offsetTuning);
}
if (_this->selectedDevName != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedDevName]["offsetTuning"] = _this->offsetTuning;
config.release(true);
}
@ -393,7 +393,7 @@ private:
rtlsdr_set_agc_mode(_this->openDev, _this->rtlAgc);
}
if (_this->selectedDevName != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedDevName]["rtlAgc"] = _this->rtlAgc;
config.release(true);
}
@ -410,7 +410,7 @@ private:
}
}
if (_this->selectedDevName != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedDevName]["tunerAgc"] = _this->tunerAgc;
config.release(true);
}
@ -424,7 +424,7 @@ private:
rtlsdr_set_tuner_gain(_this->openDev, _this->gainList[_this->gainId]);
}
if (_this->selectedDevName != "") {
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedDevName]["gain"] = _this->gainId;
config.release(true);
}

View File

@ -62,7 +62,7 @@ public:
}
srId = 7;
config.aquire();
config.acquire();
std::string hostStr = config.conf["host"];
port = config.conf["port"];
directSamplingMode = config.conf["directSamplingMode"];
@ -164,14 +164,14 @@ private:
ImGui::SetNextItemWidth(menuWidth - portWidth);
if (ImGui::InputText(CONCAT("##_ip_select_", _this->name), _this->ip, 1024)) {
config.aquire();
config.acquire();
config.conf["host"] = std::string(_this->ip);
config.release(true);
}
ImGui::SameLine();
ImGui::SetNextItemWidth(portWidth);
if (ImGui::InputInt(CONCAT("##_port_select_", _this->name), &_this->port, 0)) {
config.aquire();
config.acquire();
config.conf["port"] = _this->port;
config.release(true);
}

View File

@ -135,7 +135,7 @@ public:
refresh();
config.aquire();
config.acquire();
std::string confSelectDev = config.conf["device"];
config.release();
selectByName(confSelectDev);
@ -145,7 +145,7 @@ public:
// }
// Select device from config
// config.aquire();
// config.acquire();
// std::string devSerial = config.conf["device"];
// config.release();
// selectByString(devSerial);
@ -284,7 +284,7 @@ public:
}
bool created = false;
config.aquire();
config.acquire();
if (!config.conf["devices"].contains(selectedName)) {
created = true;
config.conf["devices"][selectedName]["sampleRate"] = sampleRates[0];
@ -478,7 +478,7 @@ private:
return;
}
// First, aquire device
// First, acquire device
sdrplay_api_ErrT err;
_this->openDev.tuner = sdrplay_api_Tuner_A;
@ -630,7 +630,7 @@ private:
if (ImGui::Combo(CONCAT("##sdrplay_dev", _this->name), &_this->devId, _this->devListTxt.c_str())) {
_this->selectById(_this->devId);
config.aquire();
config.acquire();
config.conf["device"] = _this->devNameList[_this->devId];
config.release(true);
}
@ -642,7 +642,7 @@ private:
_this->bandwidth = preferedBandwidth[_this->srId];
}
core::setInputSampleRate(_this->sampleRate);
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedName]["sampleRate"] = _this->sampleRate;
config.release(true);
}
@ -663,7 +663,7 @@ private:
_this->channelParams->tunerParams.bwType = _this->bandwidth;
sdrplay_api_Update(_this->openDev.dev, _this->openDev.tuner, sdrplay_api_Update_Tuner_BwType, sdrplay_api_Update_Ext1_None);
}
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedName]["bwMode"] = _this->bandwidthId;
config.release(true);
}
@ -678,7 +678,7 @@ private:
_this->channelParams->tunerParams.gain.LNAstate = _this->lnaGain;
sdrplay_api_Update(_this->openDev.dev, _this->openDev.tuner, sdrplay_api_Update_Tuner_Gr, sdrplay_api_Update_Ext1_None);
}
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedName]["lnaGain"] = _this->lnaGain;
config.release(true);
}
@ -692,7 +692,7 @@ private:
_this->channelParams->tunerParams.gain.gRdB = _this->gain;
sdrplay_api_Update(_this->openDev.dev, _this->openDev.tuner, sdrplay_api_Update_Tuner_Gr, sdrplay_api_Update_Ext1_None);
}
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedName]["ifGain"] = _this->gain;
config.release(true);
}
@ -711,7 +711,7 @@ private:
sdrplay_api_Update(_this->openDev.dev, _this->openDev.tuner, sdrplay_api_Update_Tuner_Gr, sdrplay_api_Update_Ext1_None);
}
}
config.aquire();
config.acquire();
config.conf["devices"][_this->selectedName]["agc"] = _this->agc;
config.release(true);
}
@ -753,7 +753,7 @@ private:
openDevParams->devParams->rsp1aParams.rfNotchEnable = rsp1a_fmNotch;
sdrplay_api_Update(openDev.dev, openDev.tuner, sdrplay_api_Update_Rsp1a_RfNotchControl, sdrplay_api_Update_Ext1_None);
}
config.aquire();
config.acquire();
config.conf["devices"][selectedName]["fmNotch"] = rsp1a_fmNotch;
config.release(true);
}
@ -762,7 +762,7 @@ private:
openDevParams->devParams->rsp1aParams.rfNotchEnable = rsp1a_dabNotch;
sdrplay_api_Update(openDev.dev, openDev.tuner, sdrplay_api_Update_Rsp1a_RfDabNotchControl, sdrplay_api_Update_Ext1_None);
}
config.aquire();
config.acquire();
config.conf["devices"][selectedName]["dabNotch"] = rsp1a_dabNotch;
config.release(true);
}
@ -771,7 +771,7 @@ private:
channelParams->rsp1aTunerParams.biasTEnable = rsp1a_biasT;
sdrplay_api_Update(openDev.dev, openDev.tuner, sdrplay_api_Update_Rsp1a_BiasTControl, sdrplay_api_Update_Ext1_None);
}
config.aquire();
config.acquire();
config.conf["devices"][selectedName]["biast"] = rsp1a_biasT;
config.release(true);
}
@ -788,7 +788,7 @@ private:
sdrplay_api_Update(openDev.dev, openDev.tuner, sdrplay_api_Update_Rsp2_AntennaControl, sdrplay_api_Update_Ext1_None);
sdrplay_api_Update(openDev.dev, openDev.tuner, sdrplay_api_Update_Rsp2_AmPortSelect, sdrplay_api_Update_Ext1_None);
}
config.aquire();
config.acquire();
config.conf["devices"][selectedName]["antenna"] = rsp2_antennaPort;
config.release(true);
}
@ -797,7 +797,7 @@ private:
channelParams->rsp2TunerParams.rfNotchEnable = rsp2_notch;
sdrplay_api_Update(openDev.dev, openDev.tuner, sdrplay_api_Update_Rsp2_RfNotchControl, sdrplay_api_Update_Ext1_None);
}
config.aquire();
config.acquire();
config.conf["devices"][selectedName]["notch"] = rsp2_notch;
config.release(true);
}
@ -806,7 +806,7 @@ private:
channelParams->rsp2TunerParams.biasTEnable = rsp2_biasT;
sdrplay_api_Update(openDev.dev, openDev.tuner, sdrplay_api_Update_Rsp2_BiasTControl, sdrplay_api_Update_Ext1_None);
}
config.aquire();
config.acquire();
config.conf["devices"][selectedName]["biast"] = rsp2_biasT;
config.release(true);
}
@ -821,7 +821,7 @@ private:
if (running) {
rspDuoSelectAntennaPort(rspduo_antennaPort);
}
config.aquire();
config.acquire();
config.conf["devices"][selectedName]["antenna"] = rspduo_antennaPort;
config.release(true);
}
@ -830,7 +830,7 @@ private:
channelParams->rspDuoTunerParams.rfNotchEnable = rspduo_fmNotch;
sdrplay_api_Update(openDev.dev, openDev.tuner, sdrplay_api_Update_RspDuo_RfNotchControl, sdrplay_api_Update_Ext1_None);
}
config.aquire();
config.acquire();
config.conf["devices"][selectedName]["fmNotch"] = rspduo_fmNotch;
config.release(true);
}
@ -839,7 +839,7 @@ private:
channelParams->rspDuoTunerParams.rfDabNotchEnable = rspduo_dabNotch;
sdrplay_api_Update(openDev.dev, openDev.tuner, sdrplay_api_Update_RspDuo_RfDabNotchControl, sdrplay_api_Update_Ext1_None);
}
config.aquire();
config.acquire();
config.conf["devices"][selectedName]["dabNotch"] = rspduo_dabNotch;
config.release(true);
}
@ -848,7 +848,7 @@ private:
channelParams->rspDuoTunerParams.tuner1AmNotchEnable = rspduo_amNotch;
sdrplay_api_Update(openDev.dev, openDev.tuner, sdrplay_api_Update_RspDuo_Tuner1AmNotchControl, sdrplay_api_Update_Ext1_None);
}
config.aquire();
config.acquire();
config.conf["devices"][selectedName]["amNotch"] = rspduo_amNotch;
config.release(true);
}
@ -857,7 +857,7 @@ private:
channelParams->rspDuoTunerParams.biasTEnable = rspduo_biasT;
sdrplay_api_Update(openDev.dev, openDev.tuner, sdrplay_api_Update_RspDuo_BiasTControl, sdrplay_api_Update_Ext1_None);
}
config.aquire();
config.acquire();
config.conf["devices"][selectedName]["biast"] = rspduo_biasT;
config.release(true);
}
@ -872,7 +872,7 @@ private:
openDevParams->devParams->rspDxParams.antennaSel = rspdx_antennaPorts[rspdx_antennaPort];
sdrplay_api_Update(openDev.dev, openDev.tuner, sdrplay_api_Update_None, sdrplay_api_Update_RspDx_AntennaControl);
}
config.aquire();
config.acquire();
config.conf["devices"][selectedName]["antenna"] = rspdx_antennaPort;
config.release(true);
}
@ -882,7 +882,7 @@ private:
openDevParams->devParams->rspDxParams.rfNotchEnable = rspdx_fmNotch;
sdrplay_api_Update(openDev.dev, openDev.tuner, sdrplay_api_Update_None, sdrplay_api_Update_RspDx_RfNotchControl);
}
config.aquire();
config.acquire();
config.conf["devices"][selectedName]["fmNotch"] = rspdx_fmNotch;
config.release(true);
}
@ -891,7 +891,7 @@ private:
openDevParams->devParams->rspDxParams.rfDabNotchEnable = rspdx_dabNotch;
sdrplay_api_Update(openDev.dev, openDev.tuner, sdrplay_api_Update_None, sdrplay_api_Update_RspDx_RfDabNotchControl);
}
config.aquire();
config.acquire();
config.conf["devices"][selectedName]["dabNotch"] = rspdx_dabNotch;
config.release(true);
}
@ -900,7 +900,7 @@ private:
openDevParams->devParams->rspDxParams.biasTEnable = rspdx_biasT;
sdrplay_api_Update(openDev.dev, openDev.tuner, sdrplay_api_Update_None, sdrplay_api_Update_RspDx_BiasTControl);
}
config.aquire();
config.acquire();
config.conf["devices"][selectedName]["biast"] = rspdx_biasT;
config.release(true);
}

View File

@ -36,7 +36,7 @@ public:
refresh();
// Select default device
config.aquire();
config.acquire();
std::string devName = config.conf["device"];
config.release();
selectDevice(devName);
@ -206,7 +206,7 @@ private:
SoapySDR::Device::unmake(dev);
config.aquire();
config.acquire();
if (config.conf["devices"].contains(name)) {
if(config.conf["devices"][name].contains("antenna")) {
uiAntennaId = config.conf["devices"][name]["antenna"];
@ -273,7 +273,7 @@ private:
if (hasAgc) {
conf["agc"] = agc;
}
config.aquire();
config.acquire();
config.conf["devices"][devArgs["label"]] = conf;
config.release(true);
}
@ -363,7 +363,7 @@ private:
ImGui::SetNextItemWidth(menuWidth);
if (ImGui::Combo(CONCAT("##_dev_select_", _this->name), &_this->devId, _this->txtDevList.c_str())) {
_this->selectDevice(_this->devList[_this->devId]["label"]);
config.aquire();
config.acquire();
config.conf["device"] = _this->devList[_this->devId]["label"];
config.release(true);
}

View File

@ -199,7 +199,7 @@ void SpyServerClient::worker() {
spdlog::warn("Dev type: {0}", devInfo.DeviceType);
}
// else if (type == MSG_TYPE_FLOAT_IQ) {
// //if (iqStream.aquire() < 0) { return; }
// //if (iqStream.acquire() < 0) { return; }
// len = receiveSync(dummyBuf, msgHeader.BodySize);
// //iqStream.write(msgHeader.BodySize);
// if (len < 0) {

View File

@ -289,7 +289,7 @@ private:
if (compositeIn1.read() < 0) { return; }
if (compositeIn2.read() < 0) { return; }
uint8_t* buf = avhrrRGBImage.aquireNextLine();
uint8_t* buf = avhrrRGBImage.acquireNextLine();
float rg, b;
for (int i = 0; i < 2048; i++) {
b = ((float)compositeIn1.readBuf[i] * 255.0f) / 1024.0f;
@ -308,7 +308,7 @@ private:
static void avhrr1Handler(uint16_t* data, int count, void* ctx) {
NOAAHRPTDecoder* _this = (NOAAHRPTDecoder*)ctx;
uint8_t* buf = _this->avhrr1Image.aquireNextLine();
uint8_t* buf = _this->avhrr1Image.acquireNextLine();
float val;
for (int i = 0; i < 2048; i++) {
val = ((float)data[i] * 255.0f) / 1024.0f;
@ -325,7 +325,7 @@ private:
static void avhrr2Handler(uint16_t* data, int count, void* ctx) {
NOAAHRPTDecoder* _this = (NOAAHRPTDecoder*)ctx;
uint8_t* buf = _this->avhrr2Image.aquireNextLine();
uint8_t* buf = _this->avhrr2Image.acquireNextLine();
float val;
for (int i = 0; i < 2048; i++) {
val = ((float)data[i] * 255.0f) / 1024.0f;
@ -342,7 +342,7 @@ private:
static void avhrr3Handler(uint16_t* data, int count, void* ctx) {
NOAAHRPTDecoder* _this = (NOAAHRPTDecoder*)ctx;
uint8_t* buf = _this->avhrr3Image.aquireNextLine();
uint8_t* buf = _this->avhrr3Image.acquireNextLine();
float val;
for (int i = 0; i < 2048; i++) {
val = ((float)data[i] * 255.0f) / 1024.0f;
@ -356,7 +356,7 @@ private:
static void avhrr4Handler(uint16_t* data, int count, void* ctx) {
NOAAHRPTDecoder* _this = (NOAAHRPTDecoder*)ctx;
uint8_t* buf = _this->avhrr4Image.aquireNextLine();
uint8_t* buf = _this->avhrr4Image.acquireNextLine();
float val;
for (int i = 0; i < 2048; i++) {
val = ((float)data[i] * 255.0f) / 1024.0f;
@ -370,7 +370,7 @@ private:
static void avhrr5Handler(uint16_t* data, int count, void* ctx) {
NOAAHRPTDecoder* _this = (NOAAHRPTDecoder*)ctx;
uint8_t* buf = _this->avhrr5Image.aquireNextLine();
uint8_t* buf = _this->avhrr5Image.acquireNextLine();
float val;
for (int i = 0; i < 2048; i++) {
val = ((float)data[i] * 255.0f) / 1024.0f;
@ -485,7 +485,7 @@ private:
static void visHandler(float* data, int count, void* ctx) {
NOAAHRPTDecoder* _this = (NOAAHRPTDecoder*)ctx;
memcpy(_this->symDiag.aquireBuffer(), data, 1024 * sizeof(float));
memcpy(_this->symDiag.acquireBuffer(), data, 1024 * sizeof(float));
_this->symDiag.releaseBuffer();
}