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;
|
||||
}
|
||||
|
||||
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"; }
|
||||
|
Loading…
Reference in New Issue
Block a user