somethings wrong, i can feel it

This commit is contained in:
2023-10-13 14:00:44 +02:00
parent c95964ce0f
commit be1fb22e39
2 changed files with 18 additions and 6 deletions

View File

@ -54,6 +54,9 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) {
}
}
}
if (channel.isBusy()) {
sif::debug << "busy" << std::endl;
}
if (channel.isBusy() and !throttlePeriodOngoing) {
// Throttle CFDP packet creator. It is by far the most relevant data creator, so throttling
// it is the easiest way to handle back pressure for now in a sensible way.
@ -74,10 +77,10 @@ ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) {
readCommandQueue();
if (DEBUG_TM_QUEUE_SPEED) {
if (consecutiveCfdpCounter > 0) {
sif::debug << "Concecutive CFDP TM handled: " << consecutiveCfdpCounter << std::endl;
sif::debug << "Consecutive CFDP TM handled: " << consecutiveCfdpCounter << std::endl;
}
if (consecutiveRegularCounter > 0) {
sif::debug << "Concecutive regular TM handled: " << consecutiveRegularCounter
sif::debug << "Consecutive regular TM handled: " << consecutiveRegularCounter
<< std::endl;
}
consecutiveRegularCounter = 0;
@ -181,7 +184,6 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd
sif::warning << "LiveTmTask: Synchronous write of last segment failed with code 0x"
<< std::setw(4) << std::hex << result << std::dec << std::endl;
}
// minimumPeriodThrottleCd.resetTimer();
}
}
// Try delete in any case, ignore failures (which should not happen), it is more important to
@ -192,13 +194,14 @@ ReturnValue_t LiveTmTask::handleGenericTmQueue(MessageQueueIF& queue, bool isCfd
void LiveTmTask::throttleCfdp() {
throttlePeriodOngoing = true;
// minimumPeriodThrottleCd.resetTimer();
signals::CFDP_CHANNEL_THROTTLE_SIGNAL = true;
sif::debug << "throttling CFDP" << std::endl;
}
void LiveTmTask::releaseCfdp() {
throttlePeriodOngoing = false;
signals::CFDP_CHANNEL_THROTTLE_SIGNAL = false;
sif::debug << "releasing CFDP" << std::endl;
}
ModeTreeChildIF& LiveTmTask::getModeTreeChildIF() { return *this; }