diff --git a/linux/ipcore/PdecHandler.cpp b/linux/ipcore/PdecHandler.cpp index 81801101..aedfef9f 100644 --- a/linux/ipcore/PdecHandler.cpp +++ b/linux/ipcore/PdecHandler.cpp @@ -185,8 +185,7 @@ ReturnValue_t PdecHandler::irqOperation() { // No TCs for timeout period checkLocks(); genericCheckCd.resetTimer(); - interruptCounter = 0; - interruptWindowCd.resetTimer(); + resetIrqLimiters(); } else if (ret >= 1) { nb = read(fd, &info, sizeof(info)); interruptCounter++; @@ -214,8 +213,7 @@ ReturnValue_t PdecHandler::irqOperation() { TaskFactory::delayTask(400); break; } - interruptWindowCd.resetTimer(); - interruptCounter = 0; + resetIrqLimiters(); } } // Clear interrupts with dummy read @@ -638,6 +636,11 @@ void PdecHandler::printPdecMon() { uint32_t PdecHandler::readFar() { return *(registerBaseAddress + PDEC_FAR_OFFSET); } +void PdecHandler::resetIrqLimiters() { + interruptWindowCd.resetTimer(); + interruptCounter = 0; +} + std::string PdecHandler::getMonStatusString(uint32_t status) { switch (status) { case TC_CHANNEL_INACTIVE: diff --git a/linux/ipcore/PdecHandler.h b/linux/ipcore/PdecHandler.h index c68926cf..5348f120 100644 --- a/linux/ipcore/PdecHandler.h +++ b/linux/ipcore/PdecHandler.h @@ -301,6 +301,8 @@ class PdecHandler : public SystemObject, public ExecutableObjectIF, public HasAc */ void checkLocks(); + void resetIrqLimiters(); + /** * @brief Analyzes the FramAna field (frame analysis data) of a FAR report. *