another bugfix in CSB
fsfw/fsfw/pipeline/pr-development There was a failure building this commit Details

This commit is contained in:
Robin Müller 2022-07-27 20:10:15 +02:00
parent d641d63531
commit f03b7cd660
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 15 additions and 4 deletions

View File

@ -49,6 +49,17 @@ ReturnValue_t Service1TelecommandVerification::performOperation(uint8_t operatio
ReturnValue_t Service1TelecommandVerification::sendVerificationReport(
PusVerificationMessage* message) {
ReturnValue_t result;
uint8_t reportId = message->getReportId();
if(reportId == 0 or reportId > 8) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Service1TelecommandVerification::sendVerificationReport: Invalid report ID " <<
static_cast<int>(reportId) << " detected" << std::endl;
#else
sif::printError("Service1TelecommandVerification::sendVerificationReport: Invalid report ID "
"%d detected\n", reportId);
#endif
return HasReturnvaluesIF::RETURN_FAILED;
}
if (message->getReportId() % 2 == 0) {
result = generateFailureReport(message);
} else {

View File

@ -457,8 +457,8 @@ void CommandingServiceBase::prepareVerificationFailureWithFullInfo(uint8_t repor
}
void CommandingServiceBase::prepareVerificationSuccessWithFullInfo(
uint8_t reportId, CommandingServiceBase::CommandInfo::TcInfo& tcInfo) {
failParams.reportId = reportId;
failParams.tcPacketId = tcInfo.tcPacketId;
failParams.tcPsc = tcInfo.tcSequenceControl;
failParams.ackFlags = tcInfo.ackFlags;
successParams.reportId = reportId;
successParams.tcPacketId = tcInfo.tcPacketId;
successParams.tcPsc = tcInfo.tcSequenceControl;
successParams.ackFlags = tcInfo.ackFlags;
}