mirror of https://github.com/g4klx/MMDVM.git
Use the wider C4FSK filters fot TX and RX.
This commit is contained in:
parent
87422228cd
commit
f92587dbbf
2
Config.h
2
Config.h
|
@ -37,7 +37,7 @@
|
|||
// For the original Arduino Due pin layout
|
||||
// #define ARDUINO_DUE_PAPA
|
||||
|
||||
// For the new Arduino Due pin layout
|
||||
// For the ZUM Board V1.0 pin layout
|
||||
#define ARDUINO_DUE_ZUM_V10
|
||||
|
||||
// For the SP8NTH board
|
||||
|
|
26
DMRTX.cpp
26
DMRTX.cpp
|
@ -23,36 +23,10 @@
|
|||
#include "Globals.h"
|
||||
#include "DMRSlotType.h"
|
||||
|
||||
// Uncomment one of the following to change the filter
|
||||
#define USE8
|
||||
// #define USE6
|
||||
// #define USE4
|
||||
// #define USE2
|
||||
|
||||
#if defined(USE8)
|
||||
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
||||
static q15_t DMR_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 DMR_C4FSK_FILTER_LEN = 42U;
|
||||
#elif defined(USE6)
|
||||
// Generated using rcosdesign(0.2, 6, 5, 'sqrt') in MATLAB
|
||||
static q15_t DMR_C4FSK_FILTER[] = {-554, 112, 911, 1474, 1452, 684, -676, -2147, -3045, -2710, -772, 2671, 7005,
|
||||
11253, 14352, 15486, 14352, 11253, 7005, 2671, -772, -2710, -3045, -2147, -676,
|
||||
684, 1452, 1474, 911, 112, -554, 0};
|
||||
const uint16_t DMR_C4FSK_FILTER_LEN = 32U;
|
||||
#elif defined(USE4)
|
||||
// Generated using rcosdesign(0.2, 4, 5, 'sqrt') in MATLAB
|
||||
static q15_t DMR_C4FSK_FILTER[] = {688, -680, -2158, -3060, -2724, -775, 2684, 7041, 11310, 14425, 15565, 14425,
|
||||
11310, 7041, 2684, -775, -2724, -3060, -2158, -680, 688, 0};
|
||||
const uint16_t DMR_C4FSK_FILTER_LEN = 22U;
|
||||
#elif defined(USE2)
|
||||
// Generated using rcosdesign(0.2, 2, 5, 'sqrt') in MATLAB
|
||||
static q15_t DMR_C4FSK_FILTER[] = {-792, 2742, 7192, 11553, 14735, 15900, 14735, 11553, 7192, 2742, -792, 0};
|
||||
const uint16_t DMR_C4FSK_FILTER_LEN = 12U;
|
||||
#else
|
||||
#error "Must define one of USE8, USE6, USE4, or USE2."
|
||||
#endif
|
||||
|
||||
const q15_t DMR_LEVELA[] = { 640, 640 , 640, 640, 640};
|
||||
const q15_t DMR_LEVELB[] = { 213, 213, 213, 213, 213};
|
||||
|
|
26
IO.cpp
26
IO.cpp
|
@ -24,36 +24,10 @@
|
|||
#include "Globals.h"
|
||||
#include "IO.h"
|
||||
|
||||
// Uncomment one of the following to change the filter
|
||||
#define USE8
|
||||
// #define USE6
|
||||
// #define USE4
|
||||
// #define USE2
|
||||
|
||||
#if defined(USE8)
|
||||
// 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;
|
||||
#elif defined(USE6)
|
||||
// Generated using rcosdesign(0.2, 6, 5, 'sqrt') in MATLAB
|
||||
static q15_t C4FSK_FILTER[] = {-554, 112, 911, 1474, 1452, 684, -676, -2147, -3045, -2710, -772, 2671, 7005,
|
||||
11253, 14352, 15486, 14352, 11253, 7005, 2671, -772, -2710, -3045, -2147, -676,
|
||||
684, 1452, 1474, 911, 112, -554, 0};
|
||||
const uint16_t C4FSK_FILTER_LEN = 32U;
|
||||
#elif defined(USE4)
|
||||
// Generated using rcosdesign(0.2, 4, 5, 'sqrt') in MATLAB
|
||||
static q15_t C4FSK_FILTER[] = {688, -680, -2158, -3060, -2724, -775, 2684, 7041, 11310, 14425, 15565, 14425,
|
||||
11310, 7041, 2684, -775, -2724, -3060, -2158, -680, 688, 0};
|
||||
const uint16_t C4FSK_FILTER_LEN = 22U;
|
||||
#elif defined(USE2)
|
||||
// Generated using rcosdesign(0.2, 2, 5, 'sqrt') in MATLAB
|
||||
static q15_t C4FSK_FILTER[] = {-792, 2742, 7192, 11553, 14735, 15900, 14735, 11553, 7192, 2742, -792, 0};
|
||||
const uint16_t C4FSK_FILTER_LEN = 12U;
|
||||
#else
|
||||
#error "Must define one of USE8, USE6, USE4, or USE2."
|
||||
#endif
|
||||
|
||||
// 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};
|
||||
|
|
26
YSFTX.cpp
26
YSFTX.cpp
|
@ -24,36 +24,10 @@
|
|||
|
||||
#include "YSFDefines.h"
|
||||
|
||||
// Uncomment one of the following to change the filter
|
||||
#define USE8
|
||||
// #define USE6
|
||||
// #define USE4
|
||||
// #define USE2
|
||||
|
||||
#if defined(USE8)
|
||||
// Generated using rcosdesign(0.2, 8, 5, 'sqrt') in MATLAB
|
||||
static q15_t YSF_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 YSF_C4FSK_FILTER_LEN = 42U;
|
||||
#elif defined(USE6)
|
||||
// Generated using rcosdesign(0.2, 6, 5, 'sqrt') in MATLAB
|
||||
static q15_t YSF_C4FSK_FILTER[] = {-554, 112, 911, 1474, 1452, 684, -676, -2147, -3045, -2710, -772, 2671, 7005,
|
||||
11253, 14352, 15486, 14352, 11253, 7005, 2671, -772, -2710, -3045, -2147, -676,
|
||||
684, 1452, 1474, 911, 112, -554, 0};
|
||||
const uint16_t YSF_C4FSK_FILTER_LEN = 32U;
|
||||
#elif defined(USE4)
|
||||
// Generated using rcosdesign(0.2, 4, 5, 'sqrt') in MATLAB
|
||||
static q15_t YSF_C4FSK_FILTER[] = {688, -680, -2158, -3060, -2724, -775, 2684, 7041, 11310, 14425, 15565, 14425,
|
||||
11310, 7041, 2684, -775, -2724, -3060, -2158, -680, 688, 0};
|
||||
const uint16_t YSF_C4FSK_FILTER_LEN = 22U;
|
||||
#elif defined(USE2)
|
||||
// Generated using rcosdesign(0.2, 2, 5, 'sqrt') in MATLAB
|
||||
static q15_t YSF_C4FSK_FILTER[] = {-792, 2742, 7192, 11553, 14735, 15900, 14735, 11553, 7192, 2742, -792, 0};
|
||||
const uint16_t YSF_C4FSK_FILTER_LEN = 12U;
|
||||
#else
|
||||
#error "Must define one of USE8, USE6, USE4, or USE2."
|
||||
#endif
|
||||
|
||||
const q15_t YSF_LEVELA[] = { 809, 809, 809, 809, 809};
|
||||
const q15_t YSF_LEVELB[] = { 269, 269, 269, 269, 269};
|
||||
|
|
Loading…
Reference in New Issue