countdown to ensure periodic lock checking
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
parent
95d2bc0887
commit
24c050765b
@ -167,6 +167,7 @@ ReturnValue_t PdecHandler::irqOperation() {
|
|||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
// No TCs for timeout period
|
// No TCs for timeout period
|
||||||
checkLocks();
|
checkLocks();
|
||||||
|
lockCheckCd.resetTimer();
|
||||||
} else if (ret >= 1) {
|
} else if (ret >= 1) {
|
||||||
nb = read(fd, &info, sizeof(info));
|
nb = read(fd, &info, sizeof(info));
|
||||||
if (nb == static_cast<ssize_t>(sizeof(info))) {
|
if (nb == static_cast<ssize_t>(sizeof(info))) {
|
||||||
@ -182,6 +183,10 @@ ReturnValue_t PdecHandler::irqOperation() {
|
|||||||
// Read FAR here
|
// Read FAR here
|
||||||
CURRENT_FAR = readFar();
|
CURRENT_FAR = readFar();
|
||||||
}
|
}
|
||||||
|
if (lockCheckCd.hasTimedOut()) {
|
||||||
|
checkLocks();
|
||||||
|
lockCheckCd.resetTimer();
|
||||||
|
}
|
||||||
// Clear interrupts with dummy read
|
// Clear interrupts with dummy read
|
||||||
ret = *(registerBaseAddress + PDEC_PIR_OFFSET);
|
ret = *(registerBaseAddress + PDEC_PIR_OFFSET);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#ifndef LINUX_OBC_PDECHANDLER_H_
|
#ifndef LINUX_OBC_PDECHANDLER_H_
|
||||||
#define LINUX_OBC_PDECHANDLER_H_
|
#define LINUX_OBC_PDECHANDLER_H_
|
||||||
|
|
||||||
|
#include <fsfw/timemanager/Countdown.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "PdecConfig.h"
|
#include "PdecConfig.h"
|
||||||
#include "fsfw/action/ActionHelper.h"
|
#include "fsfw/action/ActionHelper.h"
|
||||||
@ -200,6 +202,7 @@ class PdecHandler : public SystemObject, public ExecutableObjectIF, public HasAc
|
|||||||
|
|
||||||
static uint32_t CURRENT_FAR;
|
static uint32_t CURRENT_FAR;
|
||||||
|
|
||||||
|
Countdown lockCheckCd = Countdown(IRQ_TIMEOUT_MS);
|
||||||
object_id_t tcDestinationId;
|
object_id_t tcDestinationId;
|
||||||
|
|
||||||
AcceptsTelecommandsIF* tcDestination = nullptr;
|
AcceptsTelecommandsIF* tcDestination = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user