From 3799746ac0b399dd800b9f783542782331af0b52 Mon Sep 17 00:00:00 2001 From: f4exb Date: Mon, 22 Jul 2024 00:34:26 +0200 Subject: [PATCH] More Sonar fixes (2) --- ft8/ft8.cpp | 4 ++++ plugins/channelrx/demoddatv/ldpctool/encoder.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ft8/ft8.cpp b/ft8/ft8.cpp index b11c09604..aa9d09b97 100644 --- a/ft8/ft8.cpp +++ b/ft8/ft8.cpp @@ -1938,6 +1938,10 @@ void FT8::soft_decode(const FFTEngine::ffts_t &c79, float ll174[]) // void FT8::soft_decode_mags(FT8Params& params, const std::vector>& mags_, int nbSymbolBits, float ll174[]) { + if (nbSymbolBits > 16) { + return; + } + std::vector> mags = convert_to_snr_gen(params, nbSymbolBits, mags_); // statistics to decide soft probabilities. // distribution of strongest tones, and diff --git a/plugins/channelrx/demoddatv/ldpctool/encoder.h b/plugins/channelrx/demoddatv/ldpctool/encoder.h index fc1e07788..2c8fbd7bd 100644 --- a/plugins/channelrx/demoddatv/ldpctool/encoder.h +++ b/plugins/channelrx/demoddatv/ldpctool/encoder.h @@ -30,7 +30,7 @@ namespace ldpctool { template class LDPCEncoder { - LDPCInterface *ldpc; + LDPCInterface *ldpc = nullptr; int N = 2; int K = 1; int R = 1;