use warning instead of debug

This commit is contained in:
Robin Müller 2021-09-15 18:48:09 +02:00
parent d986ab7720
commit bc6b29e652
2 changed files with 9 additions and 8 deletions

View File

@ -41,8 +41,7 @@ ReturnValue_t Service5EventReporting::performService() {
}
}
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Service5EventReporting::generateEventReport:"
" Too many events" << std::endl;
sif::warning << "Service5EventReporting::generateEventReport: Too many events" << std::endl;
#endif
return HasReturnvaluesIF::RETURN_OK;
}
@ -64,8 +63,11 @@ ReturnValue_t Service5EventReporting::generateEventReport(
requestQueue->getDefaultDestination(),requestQueue->getId());
if(result != HasReturnvaluesIF::RETURN_OK) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Service5EventReporting::generateEventReport:"
" Could not send TM packet" << std::endl;
sif::warning << "Service5EventReporting::generateEventReport: "
"Could not send TM packet" << std::endl;
#else
sif::printWarning("Service5EventReporting::generateEventReport: "
"Could not send TM packet\n");
#endif
}
return result;

View File

@ -49,10 +49,9 @@ TmPacketStoredPusC::TmPacketStoredPusC(uint16_t apid, uint8_t service,
if (header != nullptr) {
sourceDataSize += header->getSerializedSize();
}
uint8_t *p_data = nullptr;
uint8_t *pData = nullptr;
size_t sizeToReserve = getPacketMinimumSize() + sourceDataSize;
ReturnValue_t returnValue = store->getFreeElement(&storeAddress,
sizeToReserve, &p_data);
ReturnValue_t returnValue = store->getFreeElement(&storeAddress, sizeToReserve, &pData);
if (returnValue != store->RETURN_OK) {
#if FSFW_VERBOSE_LEVEL >= 1
switch(returnValue) {
@ -84,7 +83,7 @@ TmPacketStoredPusC::TmPacketStoredPusC(uint16_t apid, uint8_t service,
TmPacketStoredBase::checkAndReportLostTm();
return;
}
setData(p_data);
setData(pData);
initializeTmPacket(apid, service, subservice, packetSubcounter, destinationId, timeRefField);
uint8_t *putDataHere = getSourceData();
size_t size = 0;