mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-04-07 15:36:21 +00:00
Remove the unused sample dumping code.
This commit is contained in:
parent
453fb33b76
commit
016ed333ec
12 changed files with 0 additions and 189 deletions
46
DMRDMORX.cpp
46
DMRDMORX.cpp
|
|
@ -18,8 +18,6 @@
|
|||
|
||||
#define WANT_DEBUG
|
||||
|
||||
// #define DUMP_SAMPLES
|
||||
|
||||
#include "Config.h"
|
||||
#include "Globals.h"
|
||||
#include "DMRDMORX.h"
|
||||
|
|
@ -147,9 +145,6 @@ bool CDMRDMORX::processSample(q15_t sample, uint16_t rssi)
|
|||
case DT_DATA_HEADER:
|
||||
DEBUG4("DMRDMORX: data header found pos/centre/threshold", m_syncPtr, centre, threshold);
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
m_state = DMORXS_DATA;
|
||||
m_type = 0x00U;
|
||||
break;
|
||||
|
|
@ -159,27 +154,18 @@ bool CDMRDMORX::processSample(q15_t sample, uint16_t rssi)
|
|||
if (m_state == DMORXS_DATA) {
|
||||
DEBUG4("DMRDMORX: data payload found pos/centre/threshold", m_syncPtr, centre, threshold);
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
m_type = dataType;
|
||||
}
|
||||
break;
|
||||
case DT_VOICE_LC_HEADER:
|
||||
DEBUG4("DMRDMORX: voice header found pos/centre/threshold", m_syncPtr, centre, threshold);
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
m_state = DMORXS_VOICE;
|
||||
break;
|
||||
case DT_VOICE_PI_HEADER:
|
||||
if (m_state == DMORXS_VOICE) {
|
||||
DEBUG4("DMRDMORX: voice pi header found pos/centre/threshold", m_syncPtr, centre, threshold);
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
}
|
||||
m_state = DMORXS_VOICE;
|
||||
break;
|
||||
|
|
@ -187,18 +173,12 @@ bool CDMRDMORX::processSample(q15_t sample, uint16_t rssi)
|
|||
if (m_state == DMORXS_VOICE) {
|
||||
DEBUG4("DMRDMORX: voice terminator found pos/centre/threshold", m_syncPtr, centre, threshold);
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
reset();
|
||||
}
|
||||
break;
|
||||
default: // DT_CSBK
|
||||
DEBUG4("DMRDMORX: csbk found pos/centre/threshold", m_syncPtr, centre, threshold);
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
reset();
|
||||
break;
|
||||
}
|
||||
|
|
@ -207,9 +187,6 @@ bool CDMRDMORX::processSample(q15_t sample, uint16_t rssi)
|
|||
// Voice sync
|
||||
DEBUG4("DMRDMORX: voice sync found pos/centre/threshold", m_syncPtr, centre, threshold);
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
m_state = DMORXS_VOICE;
|
||||
m_syncCount = 0U;
|
||||
m_n = 0U;
|
||||
|
|
@ -231,16 +208,10 @@ bool CDMRDMORX::processSample(q15_t sample, uint16_t rssi)
|
|||
}
|
||||
|
||||
serial.writeDMRData(true, frame, DMR_FRAME_LENGTH_BYTES + 1U);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
} else if (m_state == DMORXS_DATA) {
|
||||
if (m_type != 0x00U) {
|
||||
frame[0U] = CONTROL_DATA | m_type;
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -454,20 +425,3 @@ void CDMRDMORX::writeRSSIData(uint8_t* frame)
|
|||
serial.writeDMRData(true, frame, DMR_FRAME_LENGTH_BYTES + 1U);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(DUMP_SAMPLES)
|
||||
void CDMRDMORX::writeSamples(uint16_t start, uint8_t control)
|
||||
{
|
||||
q15_t samples[DMR_FRAME_LENGTH_SYMBOLS];
|
||||
|
||||
for (uint16_t i = 0U; i < DMR_FRAME_LENGTH_SYMBOLS; i++) {
|
||||
samples[i] = m_buffer[start];
|
||||
|
||||
start += DMR_RADIO_SYMBOL_LENGTH;
|
||||
if (start >= DMO_BUFFER_LENGTH_SAMPLES)
|
||||
start -= DMO_BUFFER_LENGTH_SAMPLES;
|
||||
}
|
||||
|
||||
serial.writeSamples(STATE_DMR, control, samples, DMR_FRAME_LENGTH_SYMBOLS);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue