mirror of https://github.com/g4klx/MMDVM.git
Additional changes for 48 kHz
This commit is contained in:
parent
551eac3140
commit
7f251e1380
|
@ -22,12 +22,12 @@
|
|||
#include "CWIdTX.h"
|
||||
|
||||
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[] = {
|
||||
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;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "Config.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 {
|
||||
DMORXS_NONE,
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
#include "DMRSlotType.h"
|
||||
#include "Utils.h"
|
||||
|
||||
const uint16_t SCAN_START = 400U;
|
||||
const uint16_t SCAN_END = 490U;
|
||||
const uint16_t SCAN_START = 790U;
|
||||
const uint16_t SCAN_END = 920U;
|
||||
|
||||
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;
|
||||
|
||||
// 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;
|
||||
|
||||
m_buffer[m_dataPtr] = sample;
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
private:
|
||||
bool m_slot;
|
||||
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_dataPtr;
|
||||
uint16_t m_syncPtr;
|
||||
|
|
6
IO.cpp
6
IO.cpp
|
@ -167,7 +167,7 @@ void CIO::process()
|
|||
m_ledCount++;
|
||||
if (m_started) {
|
||||
// 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_DMR && m_tx)
|
||||
dmrTX.setStart(false);
|
||||
|
@ -178,13 +178,13 @@ void CIO::process()
|
|||
m_watchdog = 0U;
|
||||
}
|
||||
|
||||
if (m_ledCount >= 24000U) {
|
||||
if (m_ledCount >= 48000U) {
|
||||
m_ledCount = 0U;
|
||||
m_ledValue = !m_ledValue;
|
||||
setLEDInt(m_ledValue);
|
||||
}
|
||||
} else {
|
||||
if (m_ledCount >= 240000U) {
|
||||
if (m_ledCount >= 480000U) {
|
||||
m_ledCount = 0U;
|
||||
m_ledValue = !m_ledValue;
|
||||
setLEDInt(m_ledValue);
|
||||
|
|
|
@ -73,9 +73,9 @@ const uint8_t MMDVM_DEBUG5 = 0xF5U;
|
|||
|
||||
|
||||
#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
|
||||
#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
|
||||
|
||||
#if defined(GITVERSION)
|
||||
|
|
Loading…
Reference in New Issue