diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ffedb56..7c013105 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,12 @@ change warranting a new major release: # [unreleased] +## Fixed + + - The CCSDS handler starts the transmitter timer each time it is commanded to MODE_ON and times out the timer when the handler is commanded to MODE_OFF + - If the timer is timed out the CCSDS handler will disable the TX clock which will cause the syrlinks to got to standby mode + - PDEC handler now parses the FAR register also in interrupt mode + # [v1.22.1] 2023-01-30 ## Changed diff --git a/linux/ipcore/PdecConfig.h b/linux/ipcore/PdecConfig.h index 284af6ef..3d909581 100644 --- a/linux/ipcore/PdecConfig.h +++ b/linux/ipcore/PdecConfig.h @@ -34,7 +34,7 @@ class PdecConfig { static const uint8_t VIRTUAL_CHANNEL = 0; static const uint8_t RESERVED_FIELD_A = 0; - static const uint16_t SPACECRAFT_ID = 0x274; + static const uint16_t SPACECRAFT_ID = 0x3DC; static const uint16_t DUMMY_BITS = 0; // Parameters to control the FARM for AD frames // Set here for future use diff --git a/linux/ipcore/PdecHandler.cpp b/linux/ipcore/PdecHandler.cpp index bc33a220..57d59841 100644 --- a/linux/ipcore/PdecHandler.cpp +++ b/linux/ipcore/PdecHandler.cpp @@ -188,6 +188,7 @@ ReturnValue_t PdecHandler::irqOperation() { if ((pisr & NEW_FAR_MASK) == NEW_FAR_MASK) { // Read FAR here CURRENT_FAR = readFar(); + checkFrameAna(CURRENT_FAR); } if (lockCheckCd.hasTimedOut()) { checkLocks(); diff --git a/mission/tmtc/CcsdsIpCoreHandler.cpp b/mission/tmtc/CcsdsIpCoreHandler.cpp index f31aeaa4..85d1143b 100644 --- a/mission/tmtc/CcsdsIpCoreHandler.cpp +++ b/mission/tmtc/CcsdsIpCoreHandler.cpp @@ -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"; }