From dcc52ca479ad99cb6cc34c86cdb728a2296d4b22 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 5 Jul 2016 18:16:47 +0100 Subject: [PATCH] Remove new filters and remove extra debugging. --- DMRIdleRX.cpp | 2 +- DMRSlotRX.cpp | 7 +------ DMRTX.cpp | 11 +---------- DStarTX.cpp | 4 ++-- DStarTX.h | 2 +- IO.cpp | 9 --------- YSFTX.cpp | 13 ++----------- YSFTX.h | 2 +- 8 files changed, 9 insertions(+), 41 deletions(-) diff --git a/DMRIdleRX.cpp b/DMRIdleRX.cpp index bc0570b..63859ef 100644 --- a/DMRIdleRX.cpp +++ b/DMRIdleRX.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define WANT_DEBUG +// #define WANT_DEBUG #include "Config.h" #include "Globals.h" diff --git a/DMRSlotRX.cpp b/DMRSlotRX.cpp index 157280b..d964ef3 100644 --- a/DMRSlotRX.cpp +++ b/DMRSlotRX.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define WANT_DEBUG +// #define WANT_DEBUG #include "Config.h" #include "Globals.h" @@ -24,13 +24,8 @@ #include "DMRSlotType.h" #include "Utils.h" -#if defined(ARDUINO_DUE_ZUM_V10) || defined(ARDUINO_DUE_NTH) -const uint16_t SCAN_START = 420U; -const uint16_t SCAN_END = 510U; -#else const uint16_t SCAN_START = 400U; const uint16_t SCAN_END = 490U; -#endif const q15_t SCALING_FACTOR = 19505; // Q15(0.60) diff --git a/DMRTX.cpp b/DMRTX.cpp index 43a14ad..49277d2 100644 --- a/DMRTX.cpp +++ b/DMRTX.cpp @@ -17,26 +17,17 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define WANT_DEBUG +// #define WANT_DEBUG #include "Config.h" #include "Globals.h" #include "DMRSlotType.h" -#if defined(ARDUINO_DUE_ZUM_V10) || defined(ARDUINO_DUE_NTH) -// Generated using rcosdesign(0.2, 6, 5, 'sqrt') plus a custom filter in MATLAB -static q15_t DMR_C4FSK_FILTER[] = {1, 2, 1, -5, -17, -28, -17, 37, 121, 175, 105, -137, -475, -690, -518, 166, 1197, 2114, 2346, 1516, -309, - -2550, -4280, -4565, -2827, 885, 5849, 10850, 14549, 15911, 14549, 10850, 5849, 885, -2827, -4565, -4280. - -2550, -309, 1516, 2346, 2114, 1197, 166, -518, -690, -475, -137, 105, 175, 121, 37, -17, -28, -17, -5, 1, - 2, 1, 0}; -const uint16_t DMR_C4FSK_FILTER_LEN = 60U; -#else // 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; -#endif const q15_t DMR_LEVEL3 = 640; const q15_t DMR_LEVEL1 = 213; diff --git a/DStarTX.cpp b/DStarTX.cpp index b80c4be..c71b1d2 100644 --- a/DStarTX.cpp +++ b/DStarTX.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define WANT_DEBUG +// #define WANT_DEBUG #include "Config.h" #include "Globals.h" @@ -457,7 +457,7 @@ void CDStarTX::writeByte(uint8_t c) void CDStarTX::setTXDelay(uint8_t delay) { - m_txDelay = 120U + uint16_t(delay) * 6U; // 200ms + tx delay + m_txDelay = 150U + uint16_t(delay) * 6U; // 250ms + tx delay } uint16_t CDStarTX::getSpace() const diff --git a/DStarTX.h b/DStarTX.h index ab9ae17..eb43a5f 100644 --- a/DStarTX.h +++ b/DStarTX.h @@ -44,7 +44,7 @@ private: q15_t m_level1[DSTAR_RADIO_BIT_LENGTH]; arm_fir_instance_q15 m_modFilter; q15_t m_modState[60U]; // NoTaps + BlockSize - 1, 12 + 40 - 1 plus some spare - uint8_t m_poBuffer[400U]; + uint8_t m_poBuffer[500U]; uint16_t m_poLen; uint16_t m_poPtr; uint16_t m_txDelay; // In bytes diff --git a/IO.cpp b/IO.cpp index 01adede..3540f10 100644 --- a/IO.cpp +++ b/IO.cpp @@ -24,20 +24,11 @@ #include "Globals.h" #include "IO.h" -#if defined(ARDUINO_DUE_ZUM_V10) || defined(ARDUINO_DUE_NTH) -// Generated using rcosdesign(0.2, 6, 5, 'sqrt') plus a custom filter in MATLAB -static q15_t C4FSK_FILTER[] = {1, 2, 1, -5, -17, -28, -17, 37, 121, 175, 105, -137, -475, -690, -518, 166, 1197, 2114, 2346, 1516, -309, - -2550, -4280, -4565, -2827, 885, 5849, 10850, 14549, 15911, 14549, 10850, 5849, 885, -2827, -4565, -4280. - -2550, -309, 1516, 2346, 2114, 1197, 166, -518, -690, -475, -137, 105, 175, 121, 37, -17, -28, -17, -5, 1, - 2, 1, 0}; -const uint16_t C4FSK_FILTER_LEN = 60U; -#else // 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; -#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}; diff --git a/YSFTX.cpp b/YSFTX.cpp index 7e0465d..b0b947a 100644 --- a/YSFTX.cpp +++ b/YSFTX.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define WANT_DEBUG +// #define WANT_DEBUG #include "Config.h" #include "Globals.h" @@ -24,20 +24,11 @@ #include "YSFDefines.h" -#if defined(ARDUINO_DUE_ZUM_V10) || defined(ARDUINO_DUE_NTH) -// Generated using rcosdesign(0.2, 6, 5, 'sqrt') plus a custom filter in MATLAB -static q15_t YSF_C4FSK_FILTER[] = {1, 2, 1, -5, -17, -28, -17, 37, 121, 175, 105, -137, -475, -690, -518, 166, 1197, 2114, 2346, 1516, -309, - -2550, -4280, -4565, -2827, 885, 5849, 10850, 14549, 15911, 14549, 10850, 5849, 885, -2827, -4565, -4280. - -2550, -309, 1516, 2346, 2114, 1197, 166, -518, -690, -475, -137, 105, 175, 121, 37, -17, -28, -17, -5, 1, - 2, 1, 0}; -const uint16_t YSF_C4FSK_FILTER_LEN = 60U; -#else // 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; -#endif const q15_t YSF_LEVEL3 = 809; const q15_t YSF_LEVEL1 = 269; @@ -177,7 +168,7 @@ void CYSFTX::writeByte(uint8_t c) void CYSFTX::setTXDelay(uint8_t delay) { - m_txDelay = 240U + uint16_t(delay) * 12U; // 200ms + tx delay + m_txDelay = 600U + uint16_t(delay) * 12U; // 500ms + tx delay } uint16_t CYSFTX::getSpace() const diff --git a/YSFTX.h b/YSFTX.h index 0e5cb18..d5b0b2a 100644 --- a/YSFTX.h +++ b/YSFTX.h @@ -44,7 +44,7 @@ private: q15_t m_levelD[YSF_RADIO_SYMBOL_LENGTH]; arm_fir_instance_q15 m_modFilter; q15_t m_modState[70U]; // NoTaps + BlockSize - 1, 42 + 20 - 1 plus some spare - uint8_t m_poBuffer[720U]; + uint8_t m_poBuffer[920U]; uint16_t m_poLen; uint16_t m_poPtr; uint16_t m_txDelay;