mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-08-21 14:36:21 +02:00
Remove the unused sample dumping code.
This commit is contained in:
@@ -18,8 +18,6 @@
|
||||
|
||||
#define WANT_DEBUG
|
||||
|
||||
// #define DUMP_SAMPLES
|
||||
|
||||
#include "Config.h"
|
||||
#include "Globals.h"
|
||||
#include "DMRSlotRX.h"
|
||||
@@ -150,9 +148,6 @@ bool CDMRSlotRX::processSample(q15_t sample, uint16_t rssi)
|
||||
case DT_DATA_HEADER:
|
||||
DEBUG5("DMRSlotRX: data header found slot/pos/centre/threshold", m_slot ? 2U : 1U, m_syncPtr, centre, threshold);
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
m_state = DMRRXS_DATA;
|
||||
m_type = 0x00U;
|
||||
break;
|
||||
@@ -162,27 +157,18 @@ bool CDMRSlotRX::processSample(q15_t sample, uint16_t rssi)
|
||||
if (m_state == DMRRXS_DATA) {
|
||||
DEBUG5("DMRSlotRX: data payload found slot/pos/centre/threshold", m_slot ? 2U : 1U, m_syncPtr, centre, threshold);
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
m_type = dataType;
|
||||
}
|
||||
break;
|
||||
case DT_VOICE_LC_HEADER:
|
||||
DEBUG5("DMRSlotRX: voice header found slot/pos/centre/threshold", m_slot ? 2U : 1U, m_syncPtr, centre, threshold);
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
m_state = DMRRXS_VOICE;
|
||||
break;
|
||||
case DT_VOICE_PI_HEADER:
|
||||
if (m_state == DMRRXS_VOICE) {
|
||||
DEBUG5("DMRSlotRX: voice pi header found slot/pos/centre/threshold", m_slot ? 2U : 1U, m_syncPtr, centre, threshold);
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
}
|
||||
m_state = DMRRXS_VOICE;
|
||||
break;
|
||||
@@ -190,9 +176,6 @@ bool CDMRSlotRX::processSample(q15_t sample, uint16_t rssi)
|
||||
if (m_state == DMRRXS_VOICE) {
|
||||
DEBUG5("DMRSlotRX: voice terminator found slot/pos/centre/threshold", m_slot ? 2U : 1U, m_syncPtr, centre, threshold);
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
m_state = DMRRXS_NONE;
|
||||
m_endPtr = NOENDPTR;
|
||||
}
|
||||
@@ -200,9 +183,6 @@ bool CDMRSlotRX::processSample(q15_t sample, uint16_t rssi)
|
||||
default: // DT_CSBK
|
||||
DEBUG5("DMRSlotRX: csbk found slot/pos/centre/threshold", m_slot ? 2U : 1U, m_syncPtr, centre, threshold);
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
m_state = DMRRXS_NONE;
|
||||
m_endPtr = NOENDPTR;
|
||||
break;
|
||||
@@ -212,9 +192,6 @@ bool CDMRSlotRX::processSample(q15_t sample, uint16_t rssi)
|
||||
// Voice sync
|
||||
DEBUG5("DMRSlotRX: voice sync found slot/pos/centre/threshold", m_slot ? 2U : 1U, m_syncPtr, centre, threshold);
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
m_state = DMRRXS_VOICE;
|
||||
m_syncCount = 0U;
|
||||
m_n = 0U;
|
||||
@@ -237,16 +214,10 @@ bool CDMRSlotRX::processSample(q15_t sample, uint16_t rssi)
|
||||
}
|
||||
|
||||
serial.writeDMRData(m_slot, frame, DMR_FRAME_LENGTH_BYTES + 1U);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
} else if (m_state == DMRRXS_DATA) {
|
||||
if (m_type != 0x00U) {
|
||||
frame[0U] = CONTROL_DATA | m_type;
|
||||
writeRSSIData(frame);
|
||||
#if defined(DUMP_SAMPLES)
|
||||
writeSamples(ptr, frame[0U]);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -431,17 +402,3 @@ void CDMRSlotRX::writeRSSIData(uint8_t* frame)
|
||||
serial.writeDMRData(m_slot, frame, DMR_FRAME_LENGTH_BYTES + 1U);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(DUMP_SAMPLES)
|
||||
void CDMRSlotRX::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;
|
||||
}
|
||||
|
||||
serial.writeSamples(STATE_DMR, control, samples, DMR_FRAME_LENGTH_SYMBOLS);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user