ccsds handler sending command to enable transmitter

This commit is contained in:
Jakob Meier
2022-05-12 18:32:19 +02:00
parent 3c3884476b
commit 919141ae10
12 changed files with 118 additions and 178 deletions

View File

@ -190,15 +190,22 @@ bool PdecHandler::newTcReceived() {
void PdecHandler::checkLocks() {
uint32_t clcw = getClcw();
if (!(clcw & NO_RF_MASK) && (lastClcw & NO_RF_MASK)) {
// Rf available changed from 0 to 1
if (not (clcw & NO_RF_MASK) && not carrierLock) {
triggerEvent(CARRIER_LOCK);
carrierLock = true;
}
if (!(clcw & NO_BITLOCK_MASK) && (lastClcw & NO_BITLOCK_MASK)) {
// Bit lock changed from 0 to 1
else if ((clcw & NO_RF_MASK) && carrierLock) {
carrierLock = false;
triggerEvent(LOST_CARRIER_LOCK_PDEC);
}
if (not (clcw & NO_BITLOCK_MASK) && not bitLock) {
triggerEvent(BIT_LOCK_PDEC);
bitLock = true;
}
else if ((clcw & NO_BITLOCK_MASK) && bitLock) {
bitLock = false;
triggerEvent(LOST_BIT_LOCK_PDEC);
}
lastClcw = clcw;
}
bool PdecHandler::checkFrameAna(uint32_t pdecFar) {