Merge remote-tracking branch 'upstream/FM' into FM

This commit is contained in:
Geoffrey Merck 2020-04-20 20:49:58 +02:00
commit 3b653dca6a
4 changed files with 11 additions and 19 deletions

24
FM.cpp
View File

@ -21,23 +21,15 @@
#include "FM.h" #include "FM.h"
q15_t FILTER_COEFFS[] = { q15_t FILTER_COEFFS[] = {
-4, 0, 1, -2, -9, -15, -16, -11, -2, 4, 6, 1, -7, -15, 26, 19, 6, -7, -13, -7, 8, 27, 35, 22, -10, -48, -70, -60, -21, 24,
-17, -9, 3, 16, 21, 14, 0, -12, -14, -1, 21, 43, 51, 41, 41, 3, -84, -185, -243, -222, -129, -23, 15, -66, -257, -471, -591, -539, -332, -94,
19, -1, -5, 14, 50, 85, 98, 81, 44, 9, 0, 28, 80, 130, 9, -134, -503, -926, -1160, -1035, -570, -5, 300, 64, -728, -1747, -2418, -2171, -732, 1688,
147, 120, 60, 2, -17, 16, 88, 157, 178, 132, 39, -52, -90, -49, 4417, 6564, 7376, 6564, 4417, 1688, -732, -2171, -2418, -1747, -728, 64, 300, -5, -570, -1035,
46, 140, 166, 96, -42, -182, -245, -195, -63, 67, 106, 7, -194, -399, -1160, -926, -503, -134, 9, -94, -332, -539, -591, -471, -257, -66, 15, -23, -129, -222,
-496, -429, -238, -41, 26, -106, -396, -697, -843, -743, -444, -121, 12, -165, -243, -185, -84, 3, 41, 24, -21, -60, -70, -48, -10, 22, 35, 27, 8, -7,
-603, -1084, -1329, -1163, -629, -6, 320, 67, -759, -1803, -2474, -2204, -739, 1695, -13, -7, 6, 19, 26};
4421, 6556, 7363, 6556, 4421, 1695, -739, -2204, -2474, -1803, -759, 67, 320, -6,
-629, -1163, -1329, -1084, -603, -165, 12, -121, -444, -743, -843, -697, -396, -106,
26, -41, -238, -429, -496, -399, -194, 7, 106, 67, -63, -195, -245, -182,
-42, 96, 166, 140, 46, -49, -90, -52, 39, 132, 178, 157, 88, 16,
-17, 2, 60, 120, 147, 130, 80, 28, 0, 9, 44, 81, 98, 85,
50, 14, -5, -1, 19, 41, 51, 43, 21, -1, -14, -12, 0, 14,
21, 16, 3, -9, -17, -15, -7, 1, 6, 4, -2, -11, -16, -15,
-9, -2, 1, 0, -4};
const uint16_t FILTER_COEFFS_LEN = 201U; const uint16_t FILTER_COEFFS_LEN = 101U;
CFM::CFM() : CFM::CFM() :
m_filter(), m_filter(),

2
FM.h
View File

@ -53,7 +53,7 @@ public:
private: private:
arm_fir_instance_q15 m_filter; arm_fir_instance_q15 m_filter;
q15_t m_filterState[230U]; // NoTaps + BlockSize - 1, 201 + 20 - 1 plus some spare q15_t m_filterState[130U]; // NoTaps + BlockSize - 1, 101 + 20 - 1 plus some spare
CFMKeyer m_callsign; CFMKeyer m_callsign;
CFMKeyer m_rfAck; CFMKeyer m_rfAck;
CFMCTCSSRX m_ctcssRX; CFMCTCSSRX m_ctcssRX;

View File

@ -102,7 +102,7 @@ uint8_t CFMCTCSSRX::setParams(uint8_t frequency, uint8_t threshold)
if (m_coeff == 0.0F) if (m_coeff == 0.0F)
return 4U; return 4U;
m_threshold = float32_t(threshold * threshold); m_threshold = float32_t(threshold);
return 0U; return 0U;
} }

View File

@ -101,7 +101,7 @@ const uint8_t MMDVM_DEBUG5 = 0xF5U;
#define HW_TYPE "MMDVM" #define HW_TYPE "MMDVM"
#endif #endif
#define DESCRIPTION "20200418 (D-Star/DMR/System Fusion/P25/NXDN/POCSAG/FM)" #define DESCRIPTION "20200420 (D-Star/DMR/System Fusion/P25/NXDN/POCSAG/FM)"
#if defined(GITVERSION) #if defined(GITVERSION)
#define concat(h, a, b, c) h " " a " " b " GitID #" c "" #define concat(h, a, b, c) h " " a " " b " GitID #" c ""