From a4814bf351349e0c73de85782ef5e8ca459a4666 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 9 Mar 2016 07:01:08 +0000 Subject: [PATCH] Reduce the C4FSK filter length significantly. --- Config.h | 2 +- IO.cpp | 6 ++---- SerialPort.cpp | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Config.h b/Config.h index 83adc12..9189105 100644 --- a/Config.h +++ b/Config.h @@ -19,7 +19,7 @@ #if !defined(CONFIG_H) #define CONFIG_H -#define WANT_DEBUG +// #define WANT_DEBUG // Allow the use of the COS line to lockout the modem // #define USE_COS_AS_LOCKOUT diff --git a/IO.cpp b/IO.cpp index 42cedb6..779a3f7 100644 --- a/IO.cpp +++ b/IO.cpp @@ -21,10 +21,8 @@ #include "IO.h" // Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB -static q15_t C4FSK_FILTER[] = {401, 104, -340, -731, -847, -553, 112, 909, 1472, 1450, 683, -675, -2144, -3040, -2706, -770, 2667, 6995, - 11237, 14331, 15464, 14331, 11237, 6995, 2667, -770, -2706, -3040, -2144, -675, 683, 1450, 1472, 909, 112, - -553, -847, -731, -340, 104, 401, 0}; -const uint16_t C4FSK_FILTER_LEN = 42U; +static q15_t C4FSK_FILTER[] = {2667, 6995, 11237, 14331, 15464, 14331, 11237, 6995, 2667, 0}; +const uint16_t C4FSK_FILTER_LEN = 10U; // Generated using gaussfir(0.5, 4, 5) in MATLAB static q15_t GMSK_FILTER[] = {8, 104, 760, 3158, 7421, 9866, 7421, 3158, 760, 104, 8, 0}; diff --git a/SerialPort.cpp b/SerialPort.cpp index 31508bf..b6f3357 100644 --- a/SerialPort.cpp +++ b/SerialPort.cpp @@ -57,7 +57,7 @@ const uint8_t MMDVM_DEBUG4 = 0xF4U; const uint8_t MMDVM_DEBUG5 = 0xF5U; const uint8_t MMDVM_SAMPLES = 0xF8U; -const uint8_t HARDWARE[] = "MMDVM 20160308 (D-Star/DMR/System Fusion)"; +const uint8_t HARDWARE[] = "MMDVM 20160309 (D-Star/DMR/System Fusion)"; const uint8_t PROTOCOL_VERSION = 1U;