Additional changes for 48 kHz

This commit is contained in:
Andy CA6JAU 2017-10-14 19:33:41 -03:00
parent 551eac3140
commit 7f251e1380
6 changed files with 14 additions and 14 deletions

View File

@ -22,12 +22,12 @@
#include "CWIdTX.h" #include "CWIdTX.h"
q15_t TONE[] = { q15_t TONE[] = {
0, 518, 1000, 1414, 1732, 1932, 2000, 1932, 1732, 1414, 1000, 518, 0, -518, -1000, -1414, -1732, -1932, -2000, -1932, -1732, -1414, -1000, -518}; 0, 261, 518, 765, 1000, 1218, 1414, 1587, 1732, 1848, 1932, 1983, 2000, 1983, 1932, 1848, 1732, 1587, 1414, 1218, 1000, 765, 518, 261, 0, -261, -518, -765, -1000, -1218, -1414,
-1587, -1732, -1848, -1932, -1983, -2000, -1983, -1932, -1848, -1732, -1587, -1414, -1218, -1000, -765, -518, -261};
q15_t SILENCE[] = { q15_t SILENCE[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
const uint8_t CYCLE_LENGTH = 24U; const uint8_t CYCLE_LENGTH = 48U;
const uint8_t DOT_LENGTH = 50U; const uint8_t DOT_LENGTH = 50U;

View File

@ -22,7 +22,7 @@
#include "Config.h" #include "Config.h"
#include "DMRDefines.h" #include "DMRDefines.h"
const uint16_t DMO_BUFFER_LENGTH_SAMPLES = 1440U; // 60ms at 24 kHz const uint16_t DMO_BUFFER_LENGTH_SAMPLES = 2880U; // 60ms at 48 kHz
enum DMORX_STATE { enum DMORX_STATE {
DMORXS_NONE, DMORXS_NONE,

View File

@ -22,8 +22,8 @@
#include "DMRSlotType.h" #include "DMRSlotType.h"
#include "Utils.h" #include "Utils.h"
const uint16_t SCAN_START = 400U; const uint16_t SCAN_START = 790U;
const uint16_t SCAN_END = 490U; const uint16_t SCAN_END = 920U;
const q15_t SCALING_FACTOR = 19505; // Q15(0.60) const q15_t SCALING_FACTOR = 19505; // Q15(0.60)
@ -97,7 +97,7 @@ bool CDMRSlotRX::processSample(q15_t sample, uint16_t rssi)
return m_state != DMRRXS_NONE; return m_state != DMRRXS_NONE;
// Ensure that the buffer doesn't overflow // Ensure that the buffer doesn't overflow
if (m_dataPtr > m_endPtr || m_dataPtr >= 900U) if (m_dataPtr > m_endPtr || m_dataPtr >= 1900U)
return m_state != DMRRXS_NONE; return m_state != DMRRXS_NONE;
m_buffer[m_dataPtr] = sample; m_buffer[m_dataPtr] = sample;

View File

@ -44,7 +44,7 @@ public:
private: private:
bool m_slot; bool m_slot;
uint32_t m_bitBuffer[DMR_RADIO_SYMBOL_LENGTH]; uint32_t m_bitBuffer[DMR_RADIO_SYMBOL_LENGTH];
q15_t m_buffer[900U]; q15_t m_buffer[1900U];
uint16_t m_bitPtr; uint16_t m_bitPtr;
uint16_t m_dataPtr; uint16_t m_dataPtr;
uint16_t m_syncPtr; uint16_t m_syncPtr;

6
IO.cpp
View File

@ -167,7 +167,7 @@ void CIO::process()
m_ledCount++; m_ledCount++;
if (m_started) { if (m_started) {
// Two seconds timeout // Two seconds timeout
if (m_watchdog >= 48000U) { if (m_watchdog >= 96000U) {
if (m_modemState == STATE_DSTAR || m_modemState == STATE_DMR || m_modemState == STATE_YSF) { if (m_modemState == STATE_DSTAR || m_modemState == STATE_DMR || m_modemState == STATE_YSF) {
if (m_modemState == STATE_DMR && m_tx) if (m_modemState == STATE_DMR && m_tx)
dmrTX.setStart(false); dmrTX.setStart(false);
@ -178,13 +178,13 @@ void CIO::process()
m_watchdog = 0U; m_watchdog = 0U;
} }
if (m_ledCount >= 24000U) { if (m_ledCount >= 48000U) {
m_ledCount = 0U; m_ledCount = 0U;
m_ledValue = !m_ledValue; m_ledValue = !m_ledValue;
setLEDInt(m_ledValue); setLEDInt(m_ledValue);
} }
} else { } else {
if (m_ledCount >= 240000U) { if (m_ledCount >= 480000U) {
m_ledCount = 0U; m_ledCount = 0U;
m_ledValue = !m_ledValue; m_ledValue = !m_ledValue;
setLEDInt(m_ledValue); setLEDInt(m_ledValue);

View File

@ -73,9 +73,9 @@ const uint8_t MMDVM_DEBUG5 = 0xF5U;
#if defined(EXTERNAL_OSC) #if defined(EXTERNAL_OSC)
#define DESCRIPTION "MMDVM 20170501 TCXO (D-Star/DMR/System Fusion/P25/RSSI/CW Id)" #define DESCRIPTION "MMDVM 20170501 TCXO 48kHz (D-Star/DMR/System Fusion/P25/RSSI/CW Id)"
#else #else
#define DESCRIPTION "MMDVM 20170501 (D-Star/DMR/System Fusion/P25/RSSI/CW Id)" #define DESCRIPTION "MMDVM 20170501 48kHz (D-Star/DMR/System Fusion/P25/RSSI/CW Id)"
#endif #endif
#if defined(GITVERSION) #if defined(GITVERSION)