corrections for transmitter timer in ccsds handler
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Jakob Meier 2023-02-01 08:27:55 +01:00
parent a4cd2d1702
commit bdf397a71e

View File

@ -135,10 +135,12 @@ ReturnValue_t CcsdsIpCoreHandler::initialize() {
return ObjectManagerIF::CHILD_INIT_FAILED;
}
transmitterCountdown.setTimeout(transmitterTimeout);
transmitterCountdown.timeOut();
#if OBSW_SYRLINKS_SIMULATED == 1
// Update data on rising edge
ptmeConfig->invertTxClock(false);
transmitterCountdown.setTimeout(transmitterTimeout);
linkState = UP;
forwardLinkstate();
#endif /* OBSW_SYRLINKS_SIMULATED == 1*/
@ -348,6 +350,9 @@ void CcsdsIpCoreHandler::enableTransmit() {
gpioIF->pullHigh(enTxClock);
gpioIF->pullHigh(enTxData);
#endif
linkState = UP;
forwardLinkstate();
transmitterCountdown.resetTimer();
}
void CcsdsIpCoreHandler::checkTxTimer() {
@ -356,6 +361,7 @@ void CcsdsIpCoreHandler::checkTxTimer() {
}
if (transmitterCountdown.hasTimedOut()) {
disableTransmit();
//TODO: set mode to off (move timer to subsystem)
}
}
@ -425,7 +431,7 @@ void CcsdsIpCoreHandler::disableTransmit() {
#endif
linkState = DOWN;
forwardLinkstate();
transmitterCountdown.setTimeout(0);
transmitterCountdown.timeOut();
}
const char* CcsdsIpCoreHandler::getName() const { return "CCSDS Handler"; }