diff --git a/core/src/core.cpp b/core/src/core.cpp index cc70054f..041a893c 100644 --- a/core/src/core.cpp +++ b/core/src/core.cpp @@ -34,7 +34,10 @@ namespace core { void setInputSampleRate(double samplerate) { // NOTE: Zoom controls won't work gui::waterfall.setBandwidth(samplerate); + gui::waterfall.setViewOffset(0); + gui::waterfall.setViewBandwidth(samplerate); sigpath::signalPath.setSampleRate(samplerate); + setViewBandwidthSlider(samplerate); } }; diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt deleted file mode 100644 index aed95f1a..00000000 --- a/demo/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.13) -project(demo) - -if (MSVC) - set(CMAKE_CXX_FLAGS "-O2 /std:c++17 /EHsc") -else() - set(CMAKE_CXX_FLAGS "-O3 -std=c++17 -fpermissive") -endif (MSVC) - -file(GLOB SRC "src/*.cpp") - -add_library(demo SHARED ${SRC}) -target_link_libraries(demo PRIVATE sdrpp_core) -set_target_properties(demo PROPERTIES PREFIX "") \ No newline at end of file diff --git a/demo/src/main.cpp b/demo/src/main.cpp deleted file mode 100644 index 4ae55798..00000000 --- a/demo/src/main.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include -#include -#include -#include - -#define CONCAT(a, b) ((std::string(a) + b).c_str()) - -MOD_INFO { - /* Name: */ "demo", - /* Description: */ "Demo module for SDR++", - /* Author: */ "Ryzerth", - /* Version: */ "0.1.0" -}; - -class DemoModule { -public: - DemoModule(std::string name) { - this->name = name; - gui::menu.registerEntry(name, menuHandler, this); - spdlog::info("DemoModule '{0}': Instance created!", name); - } - - ~DemoModule() { - spdlog::info("DemoModule '{0}': Instance deleted!", name); - } - -private: - static void menuHandler(void* ctx) { - DemoModule* _this = (DemoModule*)ctx; - ImGui::Text("Hi from %s!", _this->name.c_str()); - } - - std::string name; - -}; - -MOD_EXPORT void _INIT_() { - // Do your one time init here -} - -MOD_EXPORT void* _CREATE_INSTANCE_(std::string name) { - return new DemoModule(name); -} - -MOD_EXPORT void _DELETE_INSTANCE_(void* instance) { - delete (DemoModule*)instance; -} - -MOD_EXPORT void _STOP_() { - // Do your one shutdown here -} \ No newline at end of file diff --git a/root_dev/config.json b/root_dev/config.json index 2a539b61..c5bec388 100644 --- a/root_dev/config.json +++ b/root_dev/config.json @@ -3,7 +3,7 @@ "bandPlanEnabled": true, "centerTuning": false, "fftHeight": 300, - "frequency": 100100000, + "frequency": 98712000, "max": 0.0, "maximized": true, "menuOrder": [ @@ -41,7 +41,7 @@ "Radio": { "muted": false, "sink": "Audio", - "volume": 0.4642857015132904 + "volume": 0.2908163368701935 }, "Radio 1": { "muted": false, diff --git a/root_dev/soapy_source_config.json b/root_dev/soapy_source_config.json index 6fd6e953..c919d06e 100644 --- a/root_dev/soapy_source_config.json +++ b/root_dev/soapy_source_config.json @@ -35,7 +35,7 @@ "LNA": 24.503000259399414, "VGA": 16.332000732421875 }, - "sampleRate": 8000000.0 + "sampleRate": 16000000.0 }, "Microphone (Realtek High Definition Audio)": { "sampleRate": 96000.0 diff --git a/source_demo/CMakeLists.txt b/source_demo/CMakeLists.txt deleted file mode 100644 index 56147b8f..00000000 --- a/source_demo/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 3.13) -project(soapy) - -if (MSVC) - set(CMAKE_CXX_FLAGS "-O2 /std:c++17 /EHsc") -else() - set(CMAKE_CXX_FLAGS "-O3 -std=c++17 -fpermissive") -endif (MSVC) - -file(GLOB SRC "src/*.cpp") - -add_library(soapy SHARED ${SRC}) -target_link_libraries(soapy PRIVATE sdrpp_core) -set_target_properties(soapy PROPERTIES PREFIX "") \ No newline at end of file diff --git a/source_demo/src/main.cpp b/source_demo/src/main.cpp deleted file mode 100644 index 8617ced5..00000000 --- a/source_demo/src/main.cpp +++ /dev/null @@ -1,87 +0,0 @@ -#include -#include -#include -#include -#include - -#define CONCAT(a, b) ((std::string(a) + b).c_str()) - -MOD_INFO { - /* Name: */ "soapy", - /* Description: */ "SoapySDR input module for SDR++", - /* Author: */ "Ryzerth", - /* Version: */ "0.1.0" -}; - -class SoapyModule { -public: - SoapyModule(std::string name) { - this->name = name; - - handler.ctx = this; - handler.selectHandler = menuSelected; - handler.deselectHandler = menuDeselected; - handler.menuHandler = menuHandler; - handler.startHandler = start; - handler.stopHandler = stop; - handler.tuneHandler = tune; - sigpath::sourceManager.registerSource("SoapySDR", &handler); - spdlog::info("SoapyModule '{0}': Instance created!", name); - } - - ~SoapyModule() { - spdlog::info("SoapyModule '{0}': Instance deleted!", name); - } - -private: - static void menuSelected(void* ctx) { - SoapyModule* _this = (SoapyModule*)ctx; - spdlog::info("SoapyModule '{0}': Menu Select!", _this->name); - } - - static void menuDeselected(void* ctx) { - SoapyModule* _this = (SoapyModule*)ctx; - spdlog::info("SoapyModule '{0}': Menu Deselect!", _this->name); - } - - static void start(void* ctx) { - SoapyModule* _this = (SoapyModule*)ctx; - spdlog::info("SoapyModule '{0}': Start!", _this->name); - } - - static void stop(void* ctx) { - SoapyModule* _this = (SoapyModule*)ctx; - spdlog::info("SoapyModule '{0}': Stop!", _this->name); - } - - static void tune(double freq, void* ctx) { - SoapyModule* _this = (SoapyModule*)ctx; - spdlog::info("SoapyModule '{0}': Tune: {1}!", _this->name, freq); - } - - - static void menuHandler(void* ctx) { - SoapyModule* _this = (SoapyModule*)ctx; - ImGui::Text("Hi from %s!", _this->name.c_str()); - } - - std::string name; - dsp::stream stream; - SourceManager::SourceHandler handler; -}; - -MOD_EXPORT void _INIT_() { - // Do your one time init here -} - -MOD_EXPORT void* _CREATE_INSTANCE_(std::string name) { - return new SoapyModule(name); -} - -MOD_EXPORT void _DELETE_INSTANCE_(void* instance) { - delete (SoapyModule*)instance; -} - -MOD_EXPORT void _STOP_() { - // Do your one shutdown here -} \ No newline at end of file