mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-01-11 18:57:11 +01:00
potential fix for the RTL-SDR not tuning (mayhaps?)
This commit is contained in:
parent
6f409b59c8
commit
3d7cfffe13
@ -202,7 +202,7 @@ namespace ImGui {
|
||||
window->DrawList->AddImage((void*)(intptr_t)textureId, wfMin, wfMax);
|
||||
ImVec2 mPos = ImGui::GetMousePos();
|
||||
|
||||
if (IS_IN_AREA(mPos, wfMin, wfMax) && !gui::mainWindow.lockWaterfallControls) {
|
||||
if (IS_IN_AREA(mPos, wfMin, wfMax) && !gui::mainWindow.lockWaterfallControls && !inputHandled) {
|
||||
for (auto const& [name, vfo] : vfos) {
|
||||
window->DrawList->AddRectFilled(vfo->wfRectMin, vfo->wfRectMax, vfo->color);
|
||||
if (!vfo->lineVisible) { continue; }
|
||||
@ -749,7 +749,7 @@ namespace ImGui {
|
||||
}
|
||||
|
||||
// Handle fft resize
|
||||
if (!gui::mainWindow.lockWaterfallControls) {
|
||||
if (!gui::mainWindow.lockWaterfallControls && !inputHandled) {
|
||||
ImVec2 winSize = ImGui::GetWindowSize();
|
||||
ImVec2 mousePos = ImGui::GetMousePos();
|
||||
mousePos.x -= widgetPos.x;
|
||||
@ -1169,7 +1169,7 @@ namespace ImGui {
|
||||
window->DrawList->AddLine(lineMin, lineMax, selected ? IM_COL32(255, 0, 0, 255) : IM_COL32(255, 255, 0, 255));
|
||||
}
|
||||
|
||||
if (!gui::mainWindow.lockWaterfallControls) {
|
||||
if (!gui::mainWindow.lockWaterfallControls && !gui::waterfall.inputHandled) {
|
||||
ImVec2 mousePos = ImGui::GetMousePos();
|
||||
if (reference != REF_LOWER && !bandwidthLocked && !leftClamped) {
|
||||
if (IS_IN_AREA(mousePos, lbwSelMin, lbwSelMax)) { ImGui::SetMouseCursor(ImGuiMouseCursor_ResizeEW); }
|
||||
|
@ -296,7 +296,16 @@ private:
|
||||
static void tune(double freq, void* ctx) {
|
||||
RTLSDRSourceModule* _this = (RTLSDRSourceModule*)ctx;
|
||||
if (_this->running) {
|
||||
rtlsdr_set_center_freq(_this->openDev, freq);
|
||||
uint32_t newFreq = freq;
|
||||
int i;
|
||||
for (i = 0; i < 10; i++) {
|
||||
rtlsdr_set_center_freq(_this->openDev, freq);
|
||||
if (rtlsdr_get_center_freq(_this->openDev) == newFreq) { break; }
|
||||
}
|
||||
if (i > 1) {
|
||||
spdlog::warn("RTL-SDR took {0} attempts to tune...", i);
|
||||
}
|
||||
|
||||
}
|
||||
_this->freq = freq;
|
||||
spdlog::info("RTLSDRSourceModule '{0}': Tune: {1}!", _this->name, freq);
|
||||
|
Loading…
Reference in New Issue
Block a user