diff --git a/bladerf_source/src/main.cpp b/bladerf_source/src/main.cpp index b2bdae52..aae03f69 100644 --- a/bladerf_source/src/main.cpp +++ b/bladerf_source/src/main.cpp @@ -133,11 +133,14 @@ public: bandwidths.push_back(bwRange->max); bandwidthsTxt += getBandwdithScaled(bwRange->max); bandwidthsTxt += '\0'; + bandwidthsTxt += "Auto"; + bandwidthsTxt += '\0'; srId = 0; sampleRate = sampleRates[0]; - bwId = 0; + // Set bandwidth to auto as default + bwId = bandwidths.size(); bladerf_close(openDev); } @@ -192,7 +195,7 @@ private: // Setup device parameters bladerf_set_sample_rate(_this->openDev, BLADERF_CHANNEL_RX(0), _this->sampleRate, NULL); bladerf_set_frequency(_this->openDev, BLADERF_CHANNEL_RX(0), _this->freq); - bladerf_set_bandwidth(_this->openDev, BLADERF_CHANNEL_RX(0), _this->bandwidths[_this->bwId], NULL); + bladerf_set_bandwidth(_this->openDev, BLADERF_CHANNEL_RX(0), (_this->bwId == _this->bandwidths.size()) ? _this->sampleRate : _this->bandwidths[_this->bwId], NULL); bladerf_set_gain_mode(_this->openDev, BLADERF_CHANNEL_RX(0), BLADERF_GAIN_MANUAL); bladerf_set_gain(_this->openDev, BLADERF_CHANNEL_RX(0), _this->testGain); @@ -272,10 +275,12 @@ private: if (_this->running) { style::endDisabled(); } - ImGui::SetNextItemWidth(menuWidth); + ImGui::Text("Bandwidth"); + ImGui::SameLine(); + ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); if (ImGui::Combo(CONCAT("##_balderf_bw_sel_", _this->name), &_this->bwId, _this->bandwidthsTxt.c_str())) { if (_this->running) { - bladerf_set_bandwidth(_this->openDev, BLADERF_CHANNEL_RX(0), _this->bandwidths[_this->bwId], NULL); + bladerf_set_bandwidth(_this->openDev, BLADERF_CHANNEL_RX(0), (_this->bwId == _this->bandwidths.size()) ? _this->sampleRate : _this->bandwidths[_this->bwId], NULL); } // Save config } diff --git a/core/src/credits.cpp b/core/src/credits.cpp index 0265a1ec..fcd33d97 100644 --- a/core/src/credits.cpp +++ b/core/src/credits.cpp @@ -36,7 +36,8 @@ namespace sdrpp_credits { "ON4MU", "Passion-Radio.com", "Scanner School", - "SignalsEverywhere" + "SignalsEverywhere", + "Syne Ardwin (WI9SYN)" }; const int contributorCount = sizeof(contributors) / sizeof(char*); diff --git a/readme.md b/readme.md index f6b568f3..1eca8811 100644 --- a/readme.md +++ b/readme.md @@ -253,6 +253,7 @@ I will soon publish a contributing.md listing the code style to use. * [Paulo Matias](https://github.com/thotypous) * [Raov](https://twitter.com/raov_birbtog) * [Starman0620](https://github.com/Starman0620) +* [Syne Ardwin (WI9SYN)](https://esaille.me/) * [Szymon Zakrent](https://github.com/zakrent) * [Tobias Mädel](https://github.com/Manawyrm)