mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-25 20:07:51 +02:00
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user