diff --git a/src/_micro-api/libraries/signalDecoder/src/signalDecoder.cpp b/src/_micro-api/libraries/signalDecoder/src/signalDecoder.cpp index 9aa02dac..1dcb2169 100644 --- a/src/_micro-api/libraries/signalDecoder/src/signalDecoder.cpp +++ b/src/_micro-api/libraries/signalDecoder/src/signalDecoder.cpp @@ -135,11 +135,15 @@ inline void SignalDetectorClass::doDetect() // if (messageLen == 0) pattern_pos = patternLen = 0; // if (messageLen == 0) valid = true; if (!valid) { + //MSG_PRINT(" not valid "); + // Try output processMessage(); // processMessage was not able to find anything useful in our buffer. As the pulses are not valid, we reset and start new buffering. Also a check if pattern has opposit sign is done here again to prevent failuer adding after a move if (success == false || (messageLen > 0 && last != NULL && (*first ^ *last) > 0)) { + MSG_PRINT(" nv reset"); + reset(); valid = true; } @@ -545,6 +549,7 @@ void SignalDetectorClass::processMessage() if (MCenabled) { //DBG_PRINT(" mc: "); + //MSG_PRINT(" try mc "); static ManchesterpatternDecoder mcdecoder(this); // Init Manchester Decoder class @@ -563,7 +568,7 @@ void SignalDetectorClass::processMessage() MSG_PRINT(" MC found: "); #endif // DEBUGDECODE -#if DEBUGDECODE == 1 +//#if DEBUGDECODE == 1 // todo kommentar entfernen MSG_PRINT(MSG_START); MSG_PRINT("MC"); MSG_PRINT(SERIAL_DELIMITER); @@ -588,7 +593,7 @@ void SignalDetectorClass::processMessage() MSG_PRINT(SERIAL_DELIMITER); } MSG_PRINTLN(MSG_END); -#endif +//#endif MSG_PRINT(MSG_START); MSG_PRINT("MC"); MSG_PRINT(SERIAL_DELIMITER); @@ -617,12 +622,14 @@ void SignalDetectorClass::processMessage() } else if (mcDetected == true && m_truncated == true) { + //MSG_PRINT(" mc true"); success = true; // Prevents MU Processing } } if (MUenabled && state == clockfound && success == false && messageLen >= minMessageLen) { + //MSG_PRINT(" try mu"); #if DEBUGDECODE > 1 DBG_PRINT(" MU found: ");