bugfix for srv11

This commit is contained in:
Robin Müller 2022-05-20 11:20:31 +02:00
parent 8e2597f609
commit 0b53b4873f
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 5 additions and 9 deletions

View File

@ -117,8 +117,6 @@ template <size_t MAX_NUM_TCS>
inline ReturnValue_t Service11TelecommandScheduling<MAX_NUM_TCS>::doInsertActivity(
const uint8_t *data, size_t size) {
uint32_t timestamp = 0;
const uint8_t *initData = data;
size_t initSz = size;
ReturnValue_t result = SerializeAdapter::deSerialize(&timestamp, &data, &size, DEF_END);
if (result != RETURN_OK) {
return result;
@ -143,7 +141,7 @@ inline ReturnValue_t Service11TelecommandScheduling<MAX_NUM_TCS>::doInsertActivi
// store currentPacket and receive the store address
store_address_t addr{};
if (tcStore->addData(&addr, initData, initSz) != RETURN_OK ||
if (tcStore->addData(&addr, data, size) != RETURN_OK ||
addr.raw == storeId::INVALID_STORE_ADDRESS) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Service11TelecommandScheduling::doInsertActivity: Adding data to TC Store failed"

View File

@ -15,7 +15,7 @@ PUSDistributor::PUSDistributor(uint16_t setApid, object_id_t setObjectId,
tcStatus(RETURN_FAILED),
packetSource(setPacketSource) {}
PUSDistributor::~PUSDistributor() {}
PUSDistributor::~PUSDistributor() = default;
PUSDistributor::TcMqMapIter PUSDistributor::selectDestination() {
#if FSFW_CPP_OSTREAM_ENABLED == 1 && PUS_DISTRIBUTOR_DEBUGGING == 1
@ -23,7 +23,7 @@ PUSDistributor::TcMqMapIter PUSDistributor::selectDestination() {
sif::debug << "PUSDistributor::handlePacket received: " << storeId.poolIndex << ", "
<< storeId.packetIndex << std::endl;
#endif
TcMqMapIter queueMapIt = this->queueMap.end();
auto queueMapIt = this->queueMap.end();
if (this->currentPacket == nullptr) {
return queueMapIt;
}
@ -49,9 +49,7 @@ PUSDistributor::TcMqMapIter PUSDistributor::selectDestination() {
<< " error" << std::endl;
#else
sif::printWarning(
"PUSDistributor::handlePacket: Packet format invalid, "
"%s error\n",
keyword);
"PUSDistributor::handlePacket: Packet format invalid, %s error\n", keyword);
#endif
#endif
}
@ -133,7 +131,7 @@ ReturnValue_t PUSDistributor::initialize() {
return ObjectManagerIF::CHILD_INIT_FAILED;
}
CCSDSDistributorIF* ccsdsDistributor =
auto* ccsdsDistributor =
ObjectManager::instance()->get<CCSDSDistributorIF>(packetSource);
if (ccsdsDistributor == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1