From ef873c00bb7ef4c316498f92fc25c7b59d4d8005 Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 20 Jul 2022 22:17:33 +0200 Subject: [PATCH] M17: more fixes --- plugins/channelrx/demodm17/m17demodprocessor.h | 1 + plugins/channeltx/modm17/m17moddecimator.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/channelrx/demodm17/m17demodprocessor.h b/plugins/channelrx/demodm17/m17demodprocessor.h index 4503f33e0a..2fa0b6e658 100644 --- a/plugins/channelrx/demodm17/m17demodprocessor.h +++ b/plugins/channelrx/demodm17/m17demodprocessor.h @@ -20,6 +20,7 @@ #include +#include "dsp/dsptypes.h" #include "audio/audiocompressor.h" #include "M17Demodulator.h" #include "m17demodfilters.h" diff --git a/plugins/channeltx/modm17/m17moddecimator.cpp b/plugins/channeltx/modm17/m17moddecimator.cpp index 5aa590871d..87784dee69 100644 --- a/plugins/channeltx/modm17/m17moddecimator.cpp +++ b/plugins/channeltx/modm17/m17moddecimator.cpp @@ -48,11 +48,11 @@ void M17ModDecimator::initialize( mKernel[i] = 0; } - for (int i = 0; i < activeKernelSize; i++) + for (unsigned int i = 0; i < activeKernelSize; i++) { double y; - if (i == M/2) { + if (i == (unsigned int) M/2) { y = 2 * M_PI * Fc; } else { y = (sin(2 * M_PI * Fc * (i - M / 2)) / (i - M / 2) * @@ -114,7 +114,7 @@ void M17ModDecimator::decimate(int16_t *in, int16_t *out, unsigned int outCount) for (unsigned int i = 0; i < outCount; i++) { // Insert mRatio input samples at cursor. - for (unsigned int j = 0; j < mRatio; j++) { + for (int j = 0; j < mRatio; j++) { *shiftp++ = *inp++; }