mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2025-06-27 20:59:37 +00:00
subBuffer overflow detect
This commit is contained in:
@ -24,6 +24,7 @@ void IR_DecoderRaw::isr() {
|
||||
} else {
|
||||
if (firstUnHandledFront == &subBuffer[currentSubBufferIndex]) { // Если контроллер не успел обработать новый сигнал, принудительно пропускаем его
|
||||
firstUnHandledFront = firstUnHandledFront->next;
|
||||
isSubBufferOverflow = true;
|
||||
#ifdef IRDEBUG_INFO
|
||||
// Serial.println();
|
||||
Serial.println(" ISR BUFFER OVERFLOW ");
|
||||
@ -80,7 +81,7 @@ void IR_DecoderRaw::tick() {
|
||||
FrontStorage currentFront;
|
||||
noInterrupts();
|
||||
listenStart();
|
||||
if (firstUnHandledFront == nullptr) { interrupts(); return; } //Если данных нет - ничего не делаем
|
||||
if (firstUnHandledFront == nullptr) { isSubBufferOverflow = false; interrupts(); return; } //Если данных нет - ничего не делаем
|
||||
currentFront = *((FrontStorage*)firstUnHandledFront); //найти следующий необработанный фронт/спад
|
||||
interrupts();
|
||||
if (currentFront.next == nullptr) { isRecive = false; return; }
|
||||
|
Reference in New Issue
Block a user