diff --git a/Config.h b/Config.h
index 5d7fc5f..71813ea 100644
--- a/Config.h
+++ b/Config.h
@@ -67,10 +67,12 @@
// #define SERIAL_REPEATER
// To reduce CPU load, you can remove the DC blocker by commenting out the next line
-// #define USE_DCBLOCKER
+#define USE_DCBLOCKER
// Constant Service LED once repeater is running
// Do not use if employing an external hardware watchdog
// #define CONSTANT_SRV_LED
+// #define DSTARBOXCAR
+
#endif
diff --git a/DMRDMOTX.cpp b/DMRDMOTX.cpp
index f1b5f40..6ef0b7f 100644
--- a/DMRDMOTX.cpp
+++ b/DMRDMOTX.cpp
@@ -166,4 +166,3 @@ void CDMRDMOTX::setTXDelay(uint8_t delay)
if (m_txDelay > 1200U)
m_txDelay = 1200U;
}
-
diff --git a/DStarRX.cpp b/DStarRX.cpp
index e8e8b0d..3730de3 100644
--- a/DStarRX.cpp
+++ b/DStarRX.cpp
@@ -1,3 +1,4 @@
+
/*
* Copyright (C) 2009-2017 by Jonathan Naylor G4KLX
* Copyright (C) 2017 by Andy Uribe CA6JAU
diff --git a/IO.cpp b/IO.cpp
index cd7c26e..0e71dd6 100644
--- a/IO.cpp
+++ b/IO.cpp
@@ -49,10 +49,11 @@ static q15_t NXDN_ISINC_FILTER[] = {7616, -1333, -1856, -2611, -3399, -4006, -42
9665, 8832, 7276, 5200, 2867, 561, -1458, -2988, -3918, -4230, -4006, -3399, -2611, -1856, -1333, 7616};
const uint16_t NXDN_ISINC_FILTER_LEN = 32U;
+#if !defined (DSTARBOXCAR)
// Generated using gaussfir(0.5, 4, 10) in MATLAB
-//static q15_t GAUSSIAN_0_5_FILTER[] = {1, 4, 15, 52, 151, 380, 832, 1579, 2599, 3710, 4594, 4933, 4594, 3710, 2599, 1579, 832, 380, 151, 52, 15, 4, 1, 0};
-//const uint16_t GAUSSIAN_0_5_FILTER_LEN = 24U;
-
+static q15_t GAUSSIAN_0_5_FILTER[] = {1, 4, 15, 52, 151, 380, 832, 1579, 2599, 3710, 4594, 4933, 4594, 3710, 2599, 1579, 832, 380, 151, 52, 15, 4, 1, 0};
+const uint16_t GAUSSIAN_0_5_FILTER_LEN = 24U;
+#endif
// One symbol boxcar filter
static q15_t BOXCAR_FILTER[] = {6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 0, 0};
const uint16_t BOXCAR_FILTER_LEN = 12U;
@@ -67,12 +68,16 @@ m_rssiBuffer(RX_RINGBUFFER_SIZE),
m_dcFilter(),
m_dcState(),
m_rrcFilter(),
-//m_gaussianFilter(),
+#if !defined (DSTARBOXCAR)
+m_gaussianFilter(),
+#endif
m_boxcarFilter(),
m_nxdnFilter(),
m_nxdnISincFilter(),
m_rrcState(),
-//m_gaussianState(),
+#if !defined (DSTARBOXCAR)
+m_gaussianState(),
+#endif
m_boxcarState(),
m_nxdnState(),
m_nxdnISincState(),
@@ -95,7 +100,9 @@ m_watchdog(0U),
m_lockout(false)
{
::memset(m_rrcState, 0x00U, 140U * sizeof(q15_t));
-// ::memset(m_gaussianState, 0x00U, 80U * sizeof(q15_t));
+#if !defined (DSTARBOXCAR)
+ ::memset(m_gaussianState, 0x00U, 80U * sizeof(q15_t));
+#endif
::memset(m_boxcarState, 0x00U, 60U * sizeof(q15_t));
::memset(m_nxdnState, 0x00U, 220U * sizeof(q15_t));
::memset(m_nxdnISincState, 0x00U, 60U * sizeof(q15_t));
@@ -109,11 +116,11 @@ m_lockout(false)
m_rrcFilter.numTaps = RRC_0_2_FILTER_LEN;
m_rrcFilter.pState = m_rrcState;
m_rrcFilter.pCoeffs = RRC_0_2_FILTER;
-
-// m_gaussianFilter.numTaps = GAUSSIAN_0_5_FILTER_LEN;
-// m_gaussianFilter.pState = m_gaussianState;
-// m_gaussianFilter.pCoeffs = GAUSSIAN_0_5_FILTER;
-
+#if !defined (DSTARBOXCAR)
+ m_gaussianFilter.numTaps = GAUSSIAN_0_5_FILTER_LEN;
+ m_gaussianFilter.pState = m_gaussianState;
+ m_gaussianFilter.pCoeffs = GAUSSIAN_0_5_FILTER;
+#endif
m_boxcarFilter.numTaps = BOXCAR_FILTER_LEN;
m_boxcarFilter.pState = m_boxcarState;
m_boxcarFilter.pCoeffs = BOXCAR_FILTER;
@@ -333,9 +340,17 @@ void CIO::process()
if (m_dstarEnable) {
q15_t GMSKVals[RX_BLOCK_SIZE];
#if defined(USE_DCBLOCKER)
+ #if !defined (DSTARBOXCAR)
+ ::arm_fir_fast_q15(&m_gaussianFilter, dcSamples, GMSKVals, RX_BLOCK_SIZE);
+ #else
::arm_fir_fast_q15(&m_boxcarFilter, dcSamples, GMSKVals, RX_BLOCK_SIZE);
+ #endif
#else
- ::arm_fir_fast_q15(&m_boxcarFilter, samples, GMSKVals, RX_BLOCK_SIZE);
+ #if !defined (DSTARBOXCAR)
+ ::arm_fir_fast_q15(&m_gaussianFilter, samples, GMSKVals, RX_BLOCK_SIZE);
+ #else
+ ::arm_fir_fast_q15(&m_boxcarFilter, samples, GMSKVals, RX_BLOCK_SIZE);
+ #endif
#endif
dstarRX.samples(GMSKVals, rssi, RX_BLOCK_SIZE);
}
@@ -381,9 +396,17 @@ void CIO::process()
if (m_dstarEnable) {
q15_t GMSKVals[RX_BLOCK_SIZE];
#if defined(USE_DCBLOCKER)
+ #if !defined (DSTARBOXCAR)
+ ::arm_fir_fast_q15(&m_gaussianFilter, dcSamples, GMSKVals, RX_BLOCK_SIZE);
+ #else
::arm_fir_fast_q15(&m_boxcarFilter, dcSamples, GMSKVals, RX_BLOCK_SIZE);
+ #endif
#else
- ::arm_fir_fast_q15(&m_boxcarFilter, samples, GMSKVals, RX_BLOCK_SIZE);
+ #if !defined (DSTARBOXCAR)
+ ::arm_fir_fast_q15(&m_gaussianFilter, samples, GMSKVals, RX_BLOCK_SIZE);
+ #else
+ ::arm_fir_fast_q15(&m_boxcarFilter, samples, GMSKVals, RX_BLOCK_SIZE);
+ #endif
#endif
dstarRX.samples(GMSKVals, rssi, RX_BLOCK_SIZE);
}
@@ -437,8 +460,19 @@ void CIO::process()
}
} else if (m_modemState == STATE_DSTARCAL) {
q15_t GMSKVals[RX_BLOCK_SIZE];
- ::arm_fir_fast_q15(&m_boxcarFilter, samples, GMSKVals, RX_BLOCK_SIZE);
-
+#if defined(USE_DCBLOCKER)
+ #if !defined (DSTARBOXCAR)
+ ::arm_fir_fast_q15(&m_gaussianFilter, dcSamples, GMSKVals, RX_BLOCK_SIZE);
+ #else
+ ::arm_fir_fast_q15(&m_boxcarFilter, dcSamples, GMSKVals, RX_BLOCK_SIZE);
+ #endif
+#else
+ #if !defined (DSTARBOXCAR)
+ ::arm_fir_fast_q15(&m_gaussianFilter, samples, GMSKVals, RX_BLOCK_SIZE);
+ #else
+ ::arm_fir_fast_q15(&m_boxcarFilter, samples, GMSKVals, RX_BLOCK_SIZE);
+ #endif
+#endif
calDStarRX.samples(GMSKVals, RX_BLOCK_SIZE);
} else if (m_modemState == STATE_RSSICAL) {
calRSSI.samples(rssi, RX_BLOCK_SIZE);
diff --git a/IO.h b/IO.h
index e0dc29f..7798105 100644
--- a/IO.h
+++ b/IO.h
@@ -67,12 +67,16 @@ private:
q31_t m_dcState[4];
arm_fir_instance_q15 m_rrcFilter;
- //arm_fir_instance_q15 m_gaussianFilter;
+#if !defined (DSTARBOXCAR)
+ arm_fir_instance_q15 m_gaussianFilter;
+#endif
arm_fir_instance_q15 m_boxcarFilter;
arm_fir_instance_q15 m_nxdnFilter;
arm_fir_instance_q15 m_nxdnISincFilter;
q15_t m_rrcState[140U]; // NoTaps + BlockSize - 1, 82 + 20 - 1 plus some spare
- //q15_t m_gaussianState[80U]; // NoTaps + BlockSize - 1, 24 + 20 - 1 plus some spare
+#if !defined (DSTARBOXCAR)
+ q15_t m_gaussianState[80U]; // NoTaps + BlockSize - 1, 24 + 20 - 1 plus some spare
+#endif
q15_t m_boxcarState[60U]; // NoTaps + BlockSize - 1, 12 + 20 - 1 plus some spare
q15_t m_nxdnState[220U]; // NoTaps + BlockSize - 1, 162 + 20 - 1 plus some spare
q15_t m_nxdnISincState[60U]; // NoTaps + BlockSize - 1, 32 + 20 - 1 plus some spare
diff --git a/MMDVM_STM32F4xx.coproj b/MMDVM_STM32F4xx.coproj
index d3d976c..2eaffbd 100644
--- a/MMDVM_STM32F4xx.coproj
+++ b/MMDVM_STM32F4xx.coproj
@@ -275,8 +275,8 @@
-
+
@@ -284,15 +284,15 @@
-
+
-
+
@@ -340,8 +340,8 @@
-
+
diff --git a/SerialPort.cpp b/SerialPort.cpp
index 591be80..961b383 100644
--- a/SerialPort.cpp
+++ b/SerialPort.cpp
@@ -77,23 +77,25 @@ const uint8_t MMDVM_DEBUG4 = 0xF4U;
const uint8_t MMDVM_DEBUG5 = 0xF5U;
#if EXTERNAL_OSC == 12000000
-#define TCXO "12.0000"
+#define TCXO "12.0000 MHz"
#elif EXTERNAL_OSC == 12288000
-#define TCXO "12.2880"
+#define TCXO "12.2880 MHz"
#elif EXTERNAL_OSC == 14400000
-#define TCXO "14.4000"
+#define TCXO "14.4000 MHz"
#elif EXTERNAL_OSC == 19200000
-#define TCXO "19.2000"
+#define TCXO "19.2000 Mhz"
+#else
+#define TCXO "NO TCXO"
#endif
-#define DESCRIPTION "MMDVM 20180607 48Khz(D-Star/DMR/System Fusion/P25/NXDN)"
+#define DESCRIPTION "MMDVM 20180615 48Khz(D-Star/DMR/System Fusion/P25/NXDN)"
-#if defined(GITVERSION)
-#define concat(a, b, c) a " " b "MHz GitID #" c ""
-const char HARDWARE[] = concat(DESCRIPTION, TCXO, GITVERSION);
-#else
-#define concat(a, b, c, d) a " " b "MHz (Build: " c " " d ")"
-const char HARDWARE[] = concat(DESCRIPTION, TCXO, __TIME__, __DATE__);
+ #if defined(GITVERSION)
+ #define concat(a, b, c) a " " b " GitID #" c ""
+ const char HARDWARE[] = concat(DESCRIPTION, TCXO, GITVERSION);
+ #else
+ #define concat(a, b, c, d) a " " b " (Build: " c " " d ")"
+ const char HARDWARE[] = concat(DESCRIPTION, TCXO, __TIME__, __DATE__);
#endif
const uint8_t PROTOCOL_VERSION = 1U;