mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-01-24 00:34:44 +01:00
Fixed BladeRF and LimeSDR bugs
This commit is contained in:
parent
8f4942bbe9
commit
0dbd89db19
@ -108,6 +108,7 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
selectFirst();
|
||||||
}
|
}
|
||||||
|
|
||||||
void selectByInfo(bladerf_devinfo* info, bool reloadChannelId = true) {
|
void selectByInfo(bladerf_devinfo* info, bool reloadChannelId = true) {
|
||||||
@ -457,7 +458,7 @@ private:
|
|||||||
ImGui::Text("Gain control mode");
|
ImGui::Text("Gain control mode");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
|
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
|
||||||
if (ImGui::Combo(CONCAT("##_balderf_gm_sel_", _this->name), &_this->gainMode, _this->gainModesTxt.c_str())) {
|
if (ImGui::Combo(CONCAT("##_balderf_gm_sel_", _this->name), &_this->gainMode, _this->gainModesTxt.c_str()) && _this->selectedSerial != "") {
|
||||||
if (_this->running) {
|
if (_this->running) {
|
||||||
bladerf_set_gain_mode(_this->openDev, BLADERF_CHANNEL_RX(_this->chanId), _this->gainModes[_this->gainMode].mode);
|
bladerf_set_gain_mode(_this->openDev, BLADERF_CHANNEL_RX(_this->chanId), _this->gainModes[_this->gainMode].mode);
|
||||||
}
|
}
|
||||||
@ -472,7 +473,7 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_this->gainModes[_this->gainMode].mode != BLADERF_GAIN_MANUAL) { style::beginDisabled(); }
|
if (_this->selectedSerial != "") { if (_this->gainModes[_this->gainMode].mode != BLADERF_GAIN_MANUAL) { style::beginDisabled(); } }
|
||||||
ImGui::Text("Gain");
|
ImGui::Text("Gain");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
|
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
|
||||||
@ -487,7 +488,7 @@ private:
|
|||||||
config.release(true);
|
config.release(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_this->gainModes[_this->gainMode].mode != BLADERF_GAIN_MANUAL) { style::endDisabled(); }
|
if (_this->selectedSerial != "") { if (_this->gainModes[_this->gainMode].mode != BLADERF_GAIN_MANUAL) { style::endDisabled(); } }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ public:
|
|||||||
|
|
||||||
// Load gain
|
// Load gain
|
||||||
if (config.conf["devices"][selectedDevName].contains("gain")) {
|
if (config.conf["devices"][selectedDevName].contains("gain")) {
|
||||||
gain = config.conf["devices"][selectedDevName]["bandwidth"];
|
gain = config.conf["devices"][selectedDevName]["gain"];
|
||||||
gain = std::clamp<int>(bwId, 0, 73);
|
gain = std::clamp<int>(bwId, 0, 73);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -411,8 +411,7 @@ private:
|
|||||||
ImGui::Text("RX Channel");
|
ImGui::Text("RX Channel");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
|
ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX());
|
||||||
ImGui::Combo("##limesdr_ch_sel", &_this->chanId, _this->channelNamesTxt.c_str());
|
if (ImGui::Combo("##limesdr_ch_sel", &_this->chanId, _this->channelNamesTxt.c_str()) && _this->selectedDevName != "") {
|
||||||
if (_this->selectedDevName != "") {
|
|
||||||
config.aquire();
|
config.aquire();
|
||||||
config.conf["devices"][_this->selectedDevName]["channel"] = _this->chanId;
|
config.conf["devices"][_this->selectedDevName]["channel"] = _this->chanId;
|
||||||
config.release(true);
|
config.release(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user