Remove DV Fast Data debugging statements

This commit is contained in:
Tim Stewart 2020-11-29 21:36:16 -05:00
parent b2844bc0a6
commit bf5651b7a0

View file

@ -149,7 +149,6 @@ unsigned int CDStarControl::maybeFixupVoiceFrame(
unsigned char mini_header_type = mini_header & DSTAR_SLOW_DATA_TYPE_MASK; unsigned char mini_header_type = mini_header & DSTAR_SLOW_DATA_TYPE_MASK;
if (n == 0U) { if (n == 0U) {
LogMessage("%s frame %u: delaying FEC and DTMF processing of first voice frame", log_prefix, n);
::memcpy(voice_sync_data, data, MODEM_DATA_LEN); ::memcpy(voice_sync_data, data, MODEM_DATA_LEN);
*voice_sync_data_len = len; *voice_sync_data_len = len;
} else if ((n % 2U != 0U) && } else if ((n % 2U != 0U) &&
@ -158,49 +157,30 @@ unsigned int CDStarControl::maybeFixupVoiceFrame(
*next_frame_is_fast_data = true; *next_frame_is_fast_data = true;
if (blank_dtmf) if (blank_dtmf)
*skip_dtmf_blanking_frames = FAST_DATA_BEEP_GRACE_FRAMES; *skip_dtmf_blanking_frames = FAST_DATA_BEEP_GRACE_FRAMES;
LogMessage("%s frame %u: found fast data", log_prefix, n);
} else if (*next_frame_is_fast_data == true) { } else if (*next_frame_is_fast_data == true) {
*next_frame_is_fast_data = false; *next_frame_is_fast_data = false;
if (blank_dtmf) if (blank_dtmf)
*skip_dtmf_blanking_frames = FAST_DATA_BEEP_GRACE_FRAMES; *skip_dtmf_blanking_frames = FAST_DATA_BEEP_GRACE_FRAMES;
LogMessage("%s frame %u: found fast data (cont.)", log_prefix, n);
} else { } else {
bool voice_sync_data_is_null_ambe_data = false; bool voice_sync_data_is_null_ambe_data = false;
bool data_is_null_ambe_data = false; bool data_is_null_ambe_data = false;
if ((n == 1U) && (::memcmp(voice_sync_data + offset, DSTAR_NULL_AMBE_DATA_BYTES_SCRAMBLED, DSTAR_VOICE_FRAME_LENGTH_BYTES) == 0)) { if ((n == 1U) && (::memcmp(voice_sync_data + offset, DSTAR_NULL_AMBE_DATA_BYTES_SCRAMBLED, DSTAR_VOICE_FRAME_LENGTH_BYTES) == 0))
LogMessage("%s frame 0: *** Null AMBE data detected in voice frame ***", log_prefix);
voice_sync_data_is_null_ambe_data = true; voice_sync_data_is_null_ambe_data = true;
} if (::memcmp(data + offset, DSTAR_NULL_AMBE_DATA_BYTES_SCRAMBLED, DSTAR_VOICE_FRAME_LENGTH_BYTES) == 0)
if (::memcmp(data + offset, DSTAR_NULL_AMBE_DATA_BYTES_SCRAMBLED, DSTAR_VOICE_FRAME_LENGTH_BYTES) == 0) {
LogMessage("%s frame %u: *** Null AMBE data detected in voice frame ***", log_prefix, n);
data_is_null_ambe_data = true; data_is_null_ambe_data = true;
}
if ((n == 1U) && !voice_sync_data_is_null_ambe_data) { if ((n == 1U) && !voice_sync_data_is_null_ambe_data)
LogMessage("%s frame 0: *** REGENERATING FEC ***", log_prefix);
errors += m_fec.regenerateDStar(voice_sync_data + offset); errors += m_fec.regenerateDStar(voice_sync_data + offset);
} if (!data_is_null_ambe_data)
if (!data_is_null_ambe_data) {
LogMessage("%s frame %u: *** REGENERATING FEC ***", log_prefix, n);
errors += m_fec.regenerateDStar(data + offset); errors += m_fec.regenerateDStar(data + offset);
}
if (blank_dtmf && (*skip_dtmf_blanking_frames > 0U)) { if (blank_dtmf && (*skip_dtmf_blanking_frames > 0U)) {
(*skip_dtmf_blanking_frames)--; (*skip_dtmf_blanking_frames)--;
if (n == 1U)
LogMessage("%s frame 0: *** Not BLANKING DTMF (left to skip: %u) ***",
log_prefix, *skip_dtmf_blanking_frames);
LogMessage("%s frame %u: *** Not BLANKING DTMF (left to skip: %u) ***",
log_prefix, n, *skip_dtmf_blanking_frames);
} else if (blank_dtmf && (*skip_dtmf_blanking_frames == 0U)) { } else if (blank_dtmf && (*skip_dtmf_blanking_frames == 0U)) {
if ((n == 1U) && !voice_sync_data_is_null_ambe_data) { if ((n == 1U) && !voice_sync_data_is_null_ambe_data)
LogMessage("%s frame 0: *** BLANKING DTMF ***", log_prefix);
blankDTMF(voice_sync_data + offset); blankDTMF(voice_sync_data + offset);
} if (!data_is_null_ambe_data)
if (!data_is_null_ambe_data) {
LogMessage("%s frame %u: *** BLANKING DTMF ***", log_prefix, n);
blankDTMF(data + offset); blankDTMF(data + offset);
}
} }
} }