corrections for transmitter timer in ccsds handler
This commit is contained in:
parent
a4cd2d1702
commit
bdf397a71e
@ -135,10 +135,12 @@ ReturnValue_t CcsdsIpCoreHandler::initialize() {
|
|||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
transmitterCountdown.setTimeout(transmitterTimeout);
|
||||||
|
transmitterCountdown.timeOut();
|
||||||
|
|
||||||
#if OBSW_SYRLINKS_SIMULATED == 1
|
#if OBSW_SYRLINKS_SIMULATED == 1
|
||||||
// Update data on rising edge
|
// Update data on rising edge
|
||||||
ptmeConfig->invertTxClock(false);
|
ptmeConfig->invertTxClock(false);
|
||||||
transmitterCountdown.setTimeout(transmitterTimeout);
|
|
||||||
linkState = UP;
|
linkState = UP;
|
||||||
forwardLinkstate();
|
forwardLinkstate();
|
||||||
#endif /* OBSW_SYRLINKS_SIMULATED == 1*/
|
#endif /* OBSW_SYRLINKS_SIMULATED == 1*/
|
||||||
@ -348,6 +350,9 @@ void CcsdsIpCoreHandler::enableTransmit() {
|
|||||||
gpioIF->pullHigh(enTxClock);
|
gpioIF->pullHigh(enTxClock);
|
||||||
gpioIF->pullHigh(enTxData);
|
gpioIF->pullHigh(enTxData);
|
||||||
#endif
|
#endif
|
||||||
|
linkState = UP;
|
||||||
|
forwardLinkstate();
|
||||||
|
transmitterCountdown.resetTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CcsdsIpCoreHandler::checkTxTimer() {
|
void CcsdsIpCoreHandler::checkTxTimer() {
|
||||||
@ -356,6 +361,7 @@ void CcsdsIpCoreHandler::checkTxTimer() {
|
|||||||
}
|
}
|
||||||
if (transmitterCountdown.hasTimedOut()) {
|
if (transmitterCountdown.hasTimedOut()) {
|
||||||
disableTransmit();
|
disableTransmit();
|
||||||
|
//TODO: set mode to off (move timer to subsystem)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -425,7 +431,7 @@ void CcsdsIpCoreHandler::disableTransmit() {
|
|||||||
#endif
|
#endif
|
||||||
linkState = DOWN;
|
linkState = DOWN;
|
||||||
forwardLinkstate();
|
forwardLinkstate();
|
||||||
transmitterCountdown.setTimeout(0);
|
transmitterCountdown.timeOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* CcsdsIpCoreHandler::getName() const { return "CCSDS Handler"; }
|
const char* CcsdsIpCoreHandler::getName() const { return "CCSDS Handler"; }
|
||||||
|
Loading…
Reference in New Issue
Block a user