debug output

This commit is contained in:
iceman1001 2019-06-08 10:16:15 -04:00
commit 34d794d9fd

View file

@ -103,6 +103,7 @@ void computeSignalProperties(uint8_t *samples, uint32_t size) {
// we can detect noise
signalprop.isnoise = signalprop.amplitude < NOISE_AMPLITUDE_THRESHOLD;
if (g_debugMode)
printSignal();
}
@ -1365,6 +1366,8 @@ int BiphaseRawDecode(uint8_t *bits, size_t *size, int *offset, int invert) {
//sanity check
if (*size < 51) return -1;
if ( *offset < 0 ) *offset = 0;
uint16_t bitnum = 0;
uint16_t errCnt = 0;
size_t i = *offset;
@ -1378,7 +1381,8 @@ int BiphaseRawDecode(uint8_t *bits, size_t *size, int *offset, int invert) {
}
if (!offsetA && offsetB) ++*offset;
for (i = *offset; i < *size - 3; i += 2) {
// main loop
for (i = *offset; i < *size - 1; i += 2) {
//check for phase error
if (bits[i + 1] == bits[i + 2]) {
bits[bitnum++] = 7;
@ -1527,11 +1531,6 @@ static uint16_t cleanAskRawDemod(uint8_t *bits, size_t *size, int clk, int inver
*size = bitCnt;
/*
if (*startIdx < 0)
*startIdx = 0;
*/
if (g_debugMode == 2) prnt("DEBUG ASK: cleanAskRawDemod Startidx %d", *startIdx);
return errCnt;