diff --git a/mission/core/GenericFactory.h b/mission/core/GenericFactory.h index 9db58f5d..5902ff7b 100644 --- a/mission/core/GenericFactory.h +++ b/mission/core/GenericFactory.h @@ -1,8 +1,8 @@ #ifndef MISSION_CORE_GENERICFACTORY_H_ #define MISSION_CORE_GENERICFACTORY_H_ -#include #include +#include #include "fsfw/objectmanager/SystemObjectIF.h" #include "fsfw/power/PowerSwitchIF.h" diff --git a/mission/tmtc/CfdpTmFunnel.cpp b/mission/tmtc/CfdpTmFunnel.cpp index 818de9a7..9d5bd8ed 100644 --- a/mission/tmtc/CfdpTmFunnel.cpp +++ b/mission/tmtc/CfdpTmFunnel.cpp @@ -54,8 +54,7 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) { } size_t packetLen = 0; uint8_t* serPtr = newPacketData; - result = - spacePacketHeader.serializeBe(&serPtr, &packetLen, spacePacketHeader.getFullPacketLen()); + result = spacePacketHeader.serializeBe(&serPtr, &packetLen, spacePacketHeader.getFullPacketLen()); if (result != returnvalue::OK) { #if FSFW_CPP_OSTREAM_ENABLED == 1 sif::error << "CfdpTmFunnel::handlePacket: Error serializing packet" << std::endl; @@ -82,7 +81,8 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) { } else { #if FSFW_CPP_OSTREAM_ENABLED == 1 sif::error << "PusTmFunnel::handlePacket: Store too full to create data copy or store " - "error" << std::endl; + "error" + << std::endl; break; #endif } diff --git a/mission/tmtc/PusTmFunnel.cpp b/mission/tmtc/PusTmFunnel.cpp index ec6aa0f7..47131283 100644 --- a/mission/tmtc/PusTmFunnel.cpp +++ b/mission/tmtc/PusTmFunnel.cpp @@ -52,7 +52,7 @@ PusTmFunnel::~PusTmFunnel() = default; ReturnValue_t PusTmFunnel::performOperation(uint8_t) { CommandMessage cmdMessage; ReturnValue_t status = tcQueue->receiveMessage(&cmdMessage); - while (status == returnvalue::OK) { + if (status == returnvalue::OK) { if (cmdMessage.getMessageType() == messagetypes::TM_STORE) { Command_t cmd = cmdMessage.getCommand(); object_id_t objectId = TmStoreMessage::getObjectId(&cmdMessage); @@ -103,15 +103,15 @@ ReturnValue_t PusTmFunnel::performOperation(uint8_t) { } } } - TmTcMessage currentMessage; - status = tmQueue->receiveMessage(¤tMessage); + TmTcMessage tmMessage; + status = tmQueue->receiveMessage(&tmMessage); while (status == returnvalue::OK) { - status = handleTmPacket(currentMessage); + status = handleTmPacket(tmMessage); if (status != returnvalue::OK) { sif::warning << "TmFunnel packet handling failed" << std::endl; break; } - status = tmQueue->receiveMessage(¤tMessage); + status = tmQueue->receiveMessage(&tmMessage); } if (status == MessageQueueIF::EMPTY) { @@ -140,7 +140,7 @@ ReturnValue_t PusTmFunnel::handleTmPacket(TmTcMessage &message) { sourceSequenceCount = sourceSequenceCount % ccsds::LIMIT_SEQUENCE_COUNT; packet.updateErrorControl(); - timeval currentUptime; + timeval currentUptime{}; Clock::getUptime(¤tUptime); if (currentUptime.tv_sec - lastTvUpdate.tv_sec > static_cast(TV_UPDATE_INTERVAL_SECS)) {