Adding Jonathan G4KLX run-time debugging option

This commit is contained in:
Andy CA6JAU 2017-06-26 11:10:15 -04:00
parent 3c42d2e2ef
commit cce03a4d2f
11 changed files with 22 additions and 67 deletions

View file

@ -17,8 +17,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
//#define WANT_DEBUG
#include "Config.h"
#include "Globals.h"
#include "DStarRX.h"
@ -291,7 +289,6 @@ void CDStarRX::processNone(bool bit)
// Fuzzy matching of the preamble sync sequence
if (countBits32((m_patternBuffer & PREAMBLE_MASK) ^ PREAMBLE_DATA) <= PREAMBLE_ERRS) {
DEBUG1("DStarRX: preamble detected, fuzzy");
// Extend scan period in D-Star, once preamble is detected
m_modeTimerCnt = 0;
@ -385,12 +382,11 @@ void CDStarRX::processData(bool bit)
bool syncSeen = false;
if (m_dataBits >= SYNC_SCAN_START && m_dataBits <= (SYNC_POS + 1U)) {
if (countBits32((m_patternBuffer & DATA_SYNC_MASK) ^ DATA_SYNC_DATA) <= DATA_SYNC_ERRS) {
#if defined(WANT_DEBUG)
if (m_dataBits < SYNC_POS)
DEBUG2("DStarRX: found data sync in Data, early", SYNC_POS - m_dataBits);
else
DEBUG1("DStarRX: found data sync in Data");
#endif
m_rxBufferBits = DSTAR_DATA_LENGTH_BITS;
m_dataBits = 0U;
syncSeen = true;