mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2025-05-04 07:10:16 +00:00
fix end of data detect
This commit is contained in:
parent
59a01e6803
commit
8b07f544ca
@ -1,7 +1,7 @@
|
||||
#include "IR_Decoder.h"
|
||||
#include "IR_Encoder.h"
|
||||
|
||||
// #define IRDEBUG_INFO
|
||||
#define IRDEBUG_INFO
|
||||
|
||||
#define checkAddr(h, l) (\
|
||||
((uint16_t)((dataBuffer[h] << 8) | dataBuffer[l]) == addrSelf) || \
|
||||
@ -403,7 +403,7 @@ void IR_Decoder::writeToBuffer(bool bit) {
|
||||
void IR_Decoder::packToOutClass(uint8_t endBitOffset, uint8_t bytesToCheck, uint8_t addressForCheckOffset, InputData* objFine, InputData* objWrong = nullptr) {
|
||||
uint16_t crcValue;
|
||||
InputData* objResult = nullptr;
|
||||
if (i_dataBuffer >= endBitOffset) {
|
||||
if (i_dataBuffer == endBitOffset) {
|
||||
#ifdef IRDEBUG_INFO
|
||||
Serial.print(" IN ");
|
||||
#endif
|
||||
@ -424,7 +424,6 @@ void IR_Decoder::packToOutClass(uint8_t endBitOffset, uint8_t bytesToCheck, uint
|
||||
objResult->_set(dataBuffer, bytesToCheck + crcBytes, crcValue, errors, riseSyncTime);
|
||||
}
|
||||
isRecive = false;
|
||||
start_RX();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user