diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index ff5802d..1676df1 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -23,7 +23,7 @@ jobs: submodules: recursive - name: Install dependencies - run: sudo apt-get install libfftw3-dev libglfw3-dev libglew-dev libvolk2-dev libsoapysdr-dev libairspyhf-dev libairspy-dev libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget portaudio19-dev libcodec2-dev libssl-dev + run: sudo apt-get install libfftw3-dev libglfw3-dev libglew-dev libvolk2-dev libsoapysdr-dev libairspyhf-dev libairspy-dev libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget portaudio19-dev libcodec2-dev libssl-dev libzstd-dev - name: Patch CMakeLists.txt run: cp ${{github.workspace}}/decoder_modules/sdrpp_radiosonde/.github/workflows/CMakeLists.txt ${{github.workspace}} @@ -70,7 +70,7 @@ jobs: run: mkdir "C:/Program Files/PothosSDR" ; 7z x ${{runner.workspace}}/pothos.exe -o"C:/Program Files/PothosSDR/" - name: Install vcpkg dependencies - run: vcpkg install fftw3:x64-windows glew:x64-windows glfw3:x64-windows portaudio:x64-windows openssl-windows:x64-windows + run: vcpkg install fftw3:x64-windows glfw3:x64-windows portaudio:x64-windows zstd:x64-windows - name: Install rtaudio run: git clone https://github.com/thestk/rtaudio ; cd rtaudio ; git checkout 2f2fca4502d506abc50f6d4473b2836d24cfb1e3 ; mkdir build ; cd build ; cmake .. ; cmake --build . --config Release ; cmake --install . diff --git a/README.md b/README.md index 6bd77f7..a61cec0 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,10 @@ Compatibility: | Manufacturer | Model | GPS | Temperature | Humidity | |--------------|----------|--------------------|--------------------|--------------------| | Vaisala | RS41-SG | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Meteomodem | M10 | :heavy_check_mark: | | | +| Meteomodem | M10/M20 | :heavy_check_mark: | | | | GRAW | DFM06/09 | :heavy_check_mark: | :heavy_check_mark: | | | Meisei | iMS-100 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| InterMet | iMet-1/4 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Installing @@ -20,9 +21,9 @@ Installing Binary releases for Windows and Linux (both x86-64 only) are available from [the Releases page](https://github.com/dbdexter-dev/sdrpp_radiosonde/releases). -- **Windows**: download the `.dll` file from the latest release, and place it in +- **Windows**: download the `.dll` file from the latest release, and place it in the `modules` directory within your SDR++ installation. -- **Linux**: download the `.so` file from the latest release, and place it in +- **Linux**: download the `.so` file from the latest release, and place it in the `/usr/lib/sdrpp/plugins` folder. The plugin can then be enabled from the module manager in SDR++, under the name @@ -46,7 +47,7 @@ option(OPT_BUILD_RADIOSONDE_DECODER "Build the radiosonde decoder module (no dep ``` if (OPT_BUILD_RADIOSONDE_DECODER) add_subdirectory("decoder_modules/sdrpp_radiosonde") -endif(OPT_BUILD_RADIOSONDE_DECODER) +endif (OPT_BUILD_RADIOSONDE_DECODER) ``` 4. Navigate to the `decoder_modules` folder, then clone this repository: `git clone https://github.com/dbdexter-dev/sdrpp_radiosonde --recurse-submodules` 5. Build and install SDR++ following the guide in the original repository diff --git a/src/decode/decoder.hpp b/src/decode/decoder.hpp index 73abd44..75189c4 100644 --- a/src/decode/decoder.hpp +++ b/src/decode/decoder.hpp @@ -8,6 +8,7 @@ extern "C" { #include "sondedump/include/rs41.h" #include "sondedump/include/ims100.h" #include "sondedump/include/m10.h" +#include "sondedump/include/imet4.h" } #define LEN(x) (sizeof(x)/sizeof(*x)) @@ -40,6 +41,13 @@ namespace radiosonde { dsp::generic_block>::_block_init = true; } + void deinit(void) { + dsp::generic_block>::stop(); + dsp::generic_block>::unregisterInput(m_in); + + decoder_deinit(m_decoder); + } + int run() { SondeData fragment; int count; diff --git a/src/main.cpp b/src/main.cpp index d1d5073..1e2dd14 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -5,7 +6,6 @@ #include #include #include -#include #include "main.hpp" #include "utils.hpp" @@ -20,7 +20,7 @@ SDRPP_MOD_INFO { /* Name: */ "radiosonde_decoder", /* Description: */ "Radiosonde decoder for SDR++", /* Author: */ "dbdexter-dev", - /* Version: */ 0, 7, 0, + /* Version: */ 0, 8, 0, /* Max instances */ -1 }; @@ -67,6 +67,7 @@ RadiosondeDecoderModule::RadiosondeDecoderModule(std::string name) dfm09decoder.init(&resampler.out, OUT_SAMPLE_RATE, sondeDataHandler, this); ims100decoder.init(&resampler.out, OUT_SAMPLE_RATE, sondeDataHandler, this); m10decoder.init(&resampler.out, OUT_SAMPLE_RATE, sondeDataHandler, this); + imet4decoder.init(&resampler.out, OUT_SAMPLE_RATE, sondeDataHandler, this); fmDemod.start(); resampler.start(); @@ -126,7 +127,8 @@ void RadiosondeDecoderModule::menuHandler(void *ctx) { RadiosondeDecoderModule *_this = (RadiosondeDecoderModule*)ctx; - const float width = ImGui::GetContentRegionAvailWidth(); + const ImVec2 wh = ImGui::GetContentRegionAvail(); + const float width = wh.x; char time[64]; bool gpxStatusChanged, ptuStatusChanged; @@ -157,7 +159,7 @@ RadiosondeDecoderModule::menuHandler(void *ctx) ImGui::Text("Serial no."); if (_this->enabled) { ImGui::TableNextColumn(); - ImGui::Text(_this->lastData.serial.c_str()); + ImGui::Text("%s", _this->lastData.serial.c_str()); } ImGui::TableNextRow(); @@ -386,7 +388,6 @@ RadiosondeDecoderModule::onTypeSelected(void *ctx, int selection) config.conf[_this->name]["sondeType"] = selection; config.release(true); - /* Get new bandwidth */ bw = std::get<1>(_this->supportedTypes[selection]); @@ -410,7 +411,7 @@ RadiosondeDecoderModule::onTypeSelected(void *ctx, int selection) /* Module exports {{{ */ MOD_EXPORT void _INIT_() { json def = json({}); - config.setPath(options::opts.root + "/radiosonde_decoder_config.json"); + config.setPath(core::args["root"].s() + "/radiosonde_decoder_config.json"); config.load(def); config.enableAutoSave(); } diff --git a/src/main.hpp b/src/main.hpp index d629d3f..060958c 100644 --- a/src/main.hpp +++ b/src/main.hpp @@ -38,12 +38,14 @@ class RadiosondeDecoderModule : public ModuleManager::Instance { radiosonde::Decoder dfm09decoder; radiosonde::Decoder ims100decoder; radiosonde::Decoder m10decoder; + radiosonde::Decoder imet4decoder; - const sondespec_t supportedTypes[4] = { + const sondespec_t supportedTypes[5] = { sondespec_t("RS41", 1e4, &rs41decoder), sondespec_t("DFM06/09", 1.5e4, &dfm09decoder), sondespec_t("IMS100", 2e4, &ims100decoder), - sondespec_t("M10", 2.5e4, &m10decoder), + sondespec_t("M10/M20", 2.5e4, &m10decoder), + sondespec_t("iMet-4", 2e4, &imet4decoder), }; int selectedType = -1; dsp::generic_unnamed_block *activeDecoder;