mirror of https://github.com/g4klx/MMDVM.git
Reduce the amount of logging information.
This commit is contained in:
parent
12ca69c48d
commit
314b58912b
|
@ -225,10 +225,12 @@ void CDMRSlotRX::correlateSync(q15_t sample)
|
||||||
|
|
||||||
if (errs <= MAX_SYNC_BYTES_ERRS) {
|
if (errs <= MAX_SYNC_BYTES_ERRS) {
|
||||||
// DEBUG5("DMRSlotRX: data sync found slot/pos/centre/threshold", m_slot ? 2U : 1U, m_dataPtr, centre, threshold);
|
// DEBUG5("DMRSlotRX: data sync found slot/pos/centre/threshold", m_slot ? 2U : 1U, m_dataPtr, centre, threshold);
|
||||||
|
#if defined(WANT_DEBUG)
|
||||||
if (m_endPtr == NOENDPTR)
|
if (m_endPtr == NOENDPTR)
|
||||||
DEBUG5("DMRSlotRX: data sync found slot/pos/centre/threshold", m_slot ? 2U : 1U, m_dataPtr, centre, threshold);
|
DEBUG5("DMRSlotRX: data sync found slot/pos/centre/threshold", m_slot ? 2U : 1U, m_dataPtr, centre, threshold);
|
||||||
else
|
else
|
||||||
DEBUG3("DMRSlotRX: data sync found slot/rel pos", m_slot ? 2U : 1U, int16_t(m_dataPtr) - int16_t(m_syncPtr));
|
DEBUG3("DMRSlotRX: data sync found slot/rel pos", m_slot ? 2U : 1U, int16_t(m_dataPtr) - int16_t(m_syncPtr));
|
||||||
|
#endif
|
||||||
m_maxCorr = corr;
|
m_maxCorr = corr;
|
||||||
m_centre = centre;
|
m_centre = centre;
|
||||||
m_threshold = threshold;
|
m_threshold = threshold;
|
||||||
|
@ -243,10 +245,12 @@ void CDMRSlotRX::correlateSync(q15_t sample)
|
||||||
|
|
||||||
if (errs <= MAX_SYNC_BYTES_ERRS) {
|
if (errs <= MAX_SYNC_BYTES_ERRS) {
|
||||||
// DEBUG5("DMRSlotRX: voice sync found slot/pos/centre/threshold", m_slot ? 2U : 1U, m_dataPtr, centre, threshold);
|
// DEBUG5("DMRSlotRX: voice sync found slot/pos/centre/threshold", m_slot ? 2U : 1U, m_dataPtr, centre, threshold);
|
||||||
|
#if defined(WANT_DEBUG)
|
||||||
if (m_endPtr == NOENDPTR)
|
if (m_endPtr == NOENDPTR)
|
||||||
DEBUG5("DMRSlotRX: voice sync found slot/pos/centre/threshold", m_slot ? 2U : 1U, m_dataPtr, centre, threshold);
|
DEBUG5("DMRSlotRX: voice sync found slot/pos/centre/threshold", m_slot ? 2U : 1U, m_dataPtr, centre, threshold);
|
||||||
else
|
else
|
||||||
DEBUG3("DMRSlotRX: voice sync found slot/rel pos", m_slot ? 2U : 1U, int16_t(m_dataPtr) - int16_t(m_syncPtr));
|
DEBUG3("DMRSlotRX: voice sync found slot/rel pos", m_slot ? 2U : 1U, int16_t(m_dataPtr) - int16_t(m_syncPtr));
|
||||||
|
#endif
|
||||||
m_maxCorr = corr;
|
m_maxCorr = corr;
|
||||||
m_centre = centre;
|
m_centre = centre;
|
||||||
m_threshold = threshold;
|
m_threshold = threshold;
|
||||||
|
|
10
DStarRX.cpp
10
DStarRX.cpp
|
@ -319,7 +319,7 @@ void CDStarRX::processNone(bool bit)
|
||||||
|
|
||||||
// Exact matching of the frame sync sequence
|
// Exact matching of the frame sync sequence
|
||||||
if (countBits32((m_patternBuffer & FRAME_SYNC_MASK) ^ FRAME_SYNC_DATA) == 0U) {
|
if (countBits32((m_patternBuffer & FRAME_SYNC_MASK) ^ FRAME_SYNC_DATA) == 0U) {
|
||||||
DEBUG1("DStarRX: found frame sync in None");
|
// DEBUG1("DStarRX: found frame sync in None");
|
||||||
|
|
||||||
::memset(m_rxBuffer, 0x00U, DSTAR_FEC_SECTION_LENGTH_BYTES);
|
::memset(m_rxBuffer, 0x00U, DSTAR_FEC_SECTION_LENGTH_BYTES);
|
||||||
m_rxBufferBits = 0U;
|
m_rxBufferBits = 0U;
|
||||||
|
@ -371,7 +371,7 @@ void CDStarRX::processHeader(bool bit)
|
||||||
unsigned char header[DSTAR_HEADER_LENGTH_BYTES];
|
unsigned char header[DSTAR_HEADER_LENGTH_BYTES];
|
||||||
bool ok = rxHeader(m_rxBuffer, header);
|
bool ok = rxHeader(m_rxBuffer, header);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
DEBUG1("DStarRX: header checksum ok");
|
// DEBUG1("DStarRX: header checksum ok");
|
||||||
io.setDecode(true);
|
io.setDecode(true);
|
||||||
|
|
||||||
serial.writeDStarHeader(header, DSTAR_HEADER_LENGTH_BYTES);
|
serial.writeDStarHeader(header, DSTAR_HEADER_LENGTH_BYTES);
|
||||||
|
@ -382,7 +382,7 @@ void CDStarRX::processHeader(bool bit)
|
||||||
m_rxState = DSRXS_DATA;
|
m_rxState = DSRXS_DATA;
|
||||||
m_dataBits = MAX_SYNC_BITS;
|
m_dataBits = MAX_SYNC_BITS;
|
||||||
} else {
|
} else {
|
||||||
DEBUG1("DStarRX: header checksum failed");
|
// DEBUG1("DStarRX: header checksum failed");
|
||||||
|
|
||||||
// The checksum failed, return to looking for syncs
|
// The checksum failed, return to looking for syncs
|
||||||
m_rxState = DSRXS_NONE;
|
m_rxState = DSRXS_NONE;
|
||||||
|
@ -401,7 +401,7 @@ void CDStarRX::processData(bool bit)
|
||||||
|
|
||||||
// Fuzzy matching of the end frame sequences
|
// Fuzzy matching of the end frame sequences
|
||||||
if (countBits32((m_patternBuffer & END_SYNC_MASK) ^ END_SYNC_DATA) <= END_SYNC_ERRS) {
|
if (countBits32((m_patternBuffer & END_SYNC_MASK) ^ END_SYNC_DATA) <= END_SYNC_ERRS) {
|
||||||
DEBUG1("DStarRX: Found end sync in Data");
|
// DEBUG1("DStarRX: Found end sync in Data");
|
||||||
io.setDecode(false);
|
io.setDecode(false);
|
||||||
|
|
||||||
serial.writeDStarEOT();
|
serial.writeDStarEOT();
|
||||||
|
@ -440,7 +440,7 @@ void CDStarRX::processData(bool bit)
|
||||||
// We've not seen a data sync for too long, signal RXLOST and change to RX_NONE
|
// We've not seen a data sync for too long, signal RXLOST and change to RX_NONE
|
||||||
m_dataBits--;
|
m_dataBits--;
|
||||||
if (m_dataBits == 0U) {
|
if (m_dataBits == 0U) {
|
||||||
DEBUG1("DStarRX: data sync timed out, lost lock");
|
// DEBUG1("DStarRX: data sync timed out, lost lock");
|
||||||
io.setDecode(false);
|
io.setDecode(false);
|
||||||
|
|
||||||
serial.writeDStarLost();
|
serial.writeDStarLost();
|
||||||
|
|
|
@ -57,7 +57,7 @@ const uint8_t MMDVM_DEBUG4 = 0xF4U;
|
||||||
const uint8_t MMDVM_DEBUG5 = 0xF5U;
|
const uint8_t MMDVM_DEBUG5 = 0xF5U;
|
||||||
const uint8_t MMDVM_SAMPLES = 0xF8U;
|
const uint8_t MMDVM_SAMPLES = 0xF8U;
|
||||||
|
|
||||||
const uint8_t HARDWARE[] = "MMDVM 20160303 (D-Star/DMR/System Fusion)";
|
const uint8_t HARDWARE[] = "MMDVM 20160308 (D-Star/DMR/System Fusion)";
|
||||||
|
|
||||||
const uint8_t PROTOCOL_VERSION = 1U;
|
const uint8_t PROTOCOL_VERSION = 1U;
|
||||||
|
|
||||||
|
@ -255,31 +255,31 @@ void CSerialPort::setMode(MMDVM_STATE modemState)
|
||||||
{
|
{
|
||||||
switch (modemState) {
|
switch (modemState) {
|
||||||
case STATE_DMR:
|
case STATE_DMR:
|
||||||
DEBUG1("Mode set to DMR");
|
// DEBUG1("Mode set to DMR");
|
||||||
dstarRX.reset();
|
dstarRX.reset();
|
||||||
ysfRX.reset();
|
ysfRX.reset();
|
||||||
break;
|
break;
|
||||||
case STATE_DSTAR:
|
case STATE_DSTAR:
|
||||||
DEBUG1("Mode set to D-Star");
|
// DEBUG1("Mode set to D-Star");
|
||||||
dmrIdleRX.reset();
|
dmrIdleRX.reset();
|
||||||
dmrRX.reset();
|
dmrRX.reset();
|
||||||
ysfRX.reset();
|
ysfRX.reset();
|
||||||
break;
|
break;
|
||||||
case STATE_YSF:
|
case STATE_YSF:
|
||||||
DEBUG1("Mode set to System Fusion");
|
// DEBUG1("Mode set to System Fusion");
|
||||||
dmrIdleRX.reset();
|
dmrIdleRX.reset();
|
||||||
dmrRX.reset();
|
dmrRX.reset();
|
||||||
dstarRX.reset();
|
dstarRX.reset();
|
||||||
break;
|
break;
|
||||||
case STATE_CALIBRATE:
|
case STATE_CALIBRATE:
|
||||||
DEBUG1("Mode set to Calibrate");
|
// DEBUG1("Mode set to Calibrate");
|
||||||
dmrIdleRX.reset();
|
dmrIdleRX.reset();
|
||||||
dmrRX.reset();
|
dmrRX.reset();
|
||||||
dstarRX.reset();
|
dstarRX.reset();
|
||||||
ysfRX.reset();
|
ysfRX.reset();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DEBUG1("Mode set to Idle");
|
// DEBUG1("Mode set to Idle");
|
||||||
// STATE_IDLE
|
// STATE_IDLE
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -503,7 +503,7 @@ void CYSFRX::processData(q15_t sample)
|
||||||
// We've not seen a data sync for too long, signal RXLOST and change to RX_NONE
|
// We've not seen a data sync for too long, signal RXLOST and change to RX_NONE
|
||||||
m_lostCount--;
|
m_lostCount--;
|
||||||
if (m_lostCount == 0U) {
|
if (m_lostCount == 0U) {
|
||||||
DEBUG1("YSFRX: sync timed out, lost lock");
|
// DEBUG1("YSFRX: sync timed out, lost lock");
|
||||||
io.setDecode(false);
|
io.setDecode(false);
|
||||||
|
|
||||||
serial.writeYSFLost();
|
serial.writeYSFLost();
|
||||||
|
@ -528,7 +528,7 @@ void CYSFRX::processData(q15_t sample)
|
||||||
serial.writeYSFData(m_outBuffer, YSF_FRAME_LENGTH_BYTES + 1U);
|
serial.writeYSFData(m_outBuffer, YSF_FRAME_LENGTH_BYTES + 1U);
|
||||||
|
|
||||||
if (ok && (FICH[0U] & 0xC0U) == 0x80U) {
|
if (ok && (FICH[0U] & 0xC0U) == 0x80U) {
|
||||||
DEBUG1("YSFRX: end of transmission");
|
// DEBUG1("YSFRX: end of transmission");
|
||||||
io.setDecode(false);
|
io.setDecode(false);
|
||||||
m_state = YSFRXS_NONE;
|
m_state = YSFRXS_NONE;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue