From 7ff8f3f7b9b6512900f97cc43d947c7f18ff4613 Mon Sep 17 00:00:00 2001 From: Ryzerth Date: Mon, 8 Feb 2021 19:50:16 +0100 Subject: [PATCH] Fixed airspy_source bug --- airspy_source/src/main.cpp | 7 ++++--- core/src/gui/main_window.cpp | 4 ---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/airspy_source/src/main.cpp b/airspy_source/src/main.cpp index 3fe02e75..1c530cc0 100644 --- a/airspy_source/src/main.cpp +++ b/airspy_source/src/main.cpp @@ -105,15 +105,16 @@ public: } void selectBySerial(uint64_t serial) { - selectedSerial = serial; airspy_device* dev; - int err = airspy_open_sn(&dev, selectedSerial); + int err = airspy_open_sn(&dev, serial); if (err != 0) { char buf[1024]; - sprintf(buf, "%016" PRIX64, selectedSerial); + sprintf(buf, "%016" PRIX64, serial); spdlog::error("Could not open Airspy HF+ {0}", buf); + selectedSerial = 0; return; } + selectedSerial = serial; uint32_t sampleRates[256]; airspy_get_samplerates(dev, sampleRates, 0); diff --git a/core/src/gui/main_window.cpp b/core/src/gui/main_window.cpp index 2fa86619..d91e4717 100644 --- a/core/src/gui/main_window.cpp +++ b/core/src/gui/main_window.cpp @@ -33,10 +33,6 @@ #include #include - -#include -#include - // const int FFTSizes[] = { // 65536, // 32768,