apply afmt
This commit is contained in:
parent
07155e2546
commit
7e1aed6ad9
@ -1,9 +1,9 @@
|
||||
#include "MgmLIS3MDLHandler.h"
|
||||
|
||||
#include "fsfw/datapool/PoolReadGuard.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "fsfw/datapool/PoolReadGuard.h"
|
||||
|
||||
MgmLIS3MDLHandler::MgmLIS3MDLHandler(object_id_t objectId, object_id_t deviceCommunication,
|
||||
CookieIF *comCookie, uint32_t transitionDelay)
|
||||
: DeviceHandlerBase(objectId, deviceCommunication, comCookie),
|
||||
|
@ -24,9 +24,7 @@ void UartCookie::setParityEven() { parity = Parity::EVEN; }
|
||||
|
||||
Parity UartCookie::getParity() const { return parity; }
|
||||
|
||||
void UartCookie::setBitsPerWord(BitsPerWord bitsPerWord_) {
|
||||
bitsPerWord = bitsPerWord_;
|
||||
}
|
||||
void UartCookie::setBitsPerWord(BitsPerWord bitsPerWord_) { bitsPerWord = bitsPerWord_; }
|
||||
|
||||
BitsPerWord UartCookie::getBitsPerWord() const { return bitsPerWord; }
|
||||
|
||||
|
@ -787,9 +787,9 @@ ReturnValue_t LocalDataPoolManager::generateSetStructurePacket(sid_t sid, bool i
|
||||
// Serialize set packet into store.
|
||||
size_t size = 0;
|
||||
result = setPacket.serialize(&storePtr, &size, expectedSize, SerializeIF::Endianness::BIG);
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
ipcStore->deleteData(storeId);
|
||||
return result;
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
ipcStore->deleteData(storeId);
|
||||
return result;
|
||||
}
|
||||
if (expectedSize != size) {
|
||||
printWarningOrError(sif::OutputTypes::OUT_WARNING, "generateSetStructurePacket",
|
||||
@ -806,8 +806,8 @@ ReturnValue_t LocalDataPoolManager::generateSetStructurePacket(sid_t sid, bool i
|
||||
}
|
||||
|
||||
result = hkQueue->reply(&reply);
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
ipcStore->deleteData(storeId);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
ipcStore->deleteData(storeId);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -458,16 +458,15 @@ size_t DeviceHandlerBase::getNextReplyLength(DeviceCommandId_t commandId) {
|
||||
DeviceCommandId_t replyId = NO_COMMAND_ID;
|
||||
DeviceCommandMap::iterator command = cookieInfo.pendingCommand;
|
||||
if (command->second.useAlternativeReplyId) {
|
||||
replyId = command->second.alternativeReplyId;
|
||||
}
|
||||
else {
|
||||
replyId = commandId;
|
||||
replyId = command->second.alternativeReplyId;
|
||||
} else {
|
||||
replyId = commandId;
|
||||
}
|
||||
DeviceReplyIter iter = deviceReplyMap.find(replyId);
|
||||
if (iter != deviceReplyMap.end()) {
|
||||
if (iter->second.delayCycles != 0) {
|
||||
return iter->second.replyLen;
|
||||
}
|
||||
if (iter->second.delayCycles != 0) {
|
||||
return iter->second.replyLen;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -59,14 +59,13 @@ class PeriodicTask : public RTEMSTaskBase, public PeriodicTaskIF {
|
||||
*/
|
||||
ReturnValue_t addComponent(object_id_t object) override;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Adds an object to the list of objects to be executed.
|
||||
* The objects are executed in the order added.
|
||||
* @param object pointer to the object to add.
|
||||
* @return RETURN_OK on success, RETURN_FAILED if the object could not be added.
|
||||
*/
|
||||
ReturnValue_t addComponent(ExecutableObjectIF* object) override;
|
||||
|
||||
ReturnValue_t addComponent(ExecutableObjectIF *object) override;
|
||||
|
||||
uint32_t getPeriodMs() const override;
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
#include "version.h"
|
||||
#include "fsfw/FSFWVersion.h"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "fsfw/FSFWVersion.h"
|
||||
|
||||
#ifdef major
|
||||
#undef major
|
||||
#endif
|
||||
|
@ -30,7 +30,7 @@ class Version {
|
||||
}
|
||||
|
||||
friend bool operator>(const Version& v1, const Version& v2) {
|
||||
return not (v1 < v2) and not (v1 == v2);
|
||||
return not(v1 < v2) and not(v1 == v2);
|
||||
}
|
||||
|
||||
friend bool operator<=(const Version& v1, const Version& v2) { return ((v1 == v2) or (v1 < v2)); }
|
||||
|
@ -17,15 +17,15 @@ TEST_CASE("Version API Tests", "[TestVersionAPI]") {
|
||||
fsfw::Version v1 = fsfw::Version(1, 1, 1);
|
||||
fsfw::Version v2 = fsfw::Version(1, 1, 1);
|
||||
REQUIRE(v1 == v2);
|
||||
REQUIRE(not (v1 < v2));
|
||||
REQUIRE(not (v1 > v2));
|
||||
REQUIRE(not(v1 < v2));
|
||||
REQUIRE(not(v1 > v2));
|
||||
REQUIRE(v1 <= v2);
|
||||
REQUIRE(v1 >= v2);
|
||||
v1.revision -= 1;
|
||||
REQUIRE(v1 != v2);
|
||||
REQUIRE(not (v1 == v2));
|
||||
REQUIRE(not (v1 > v2));
|
||||
REQUIRE(not (v1 >= v2));
|
||||
REQUIRE(not(v1 == v2));
|
||||
REQUIRE(not(v1 > v2));
|
||||
REQUIRE(not(v1 >= v2));
|
||||
REQUIRE(v1 < v2);
|
||||
REQUIRE(v1 <= v2);
|
||||
v1.revision += 1;
|
||||
@ -33,60 +33,60 @@ TEST_CASE("Version API Tests", "[TestVersionAPI]") {
|
||||
REQUIRE(v1 != v2);
|
||||
REQUIRE(v1 < v2);
|
||||
REQUIRE(v1 <= v2);
|
||||
REQUIRE(not (v1 == v2));
|
||||
REQUIRE(not (v1 > v2));
|
||||
REQUIRE(not (v1 >= v2));
|
||||
REQUIRE(not(v1 == v2));
|
||||
REQUIRE(not(v1 > v2));
|
||||
REQUIRE(not(v1 >= v2));
|
||||
v1.minor += 1;
|
||||
v1.major -= 1;
|
||||
REQUIRE(v1 != v2);
|
||||
REQUIRE(v1 < v2);
|
||||
REQUIRE(v1 <= v2);
|
||||
REQUIRE(not (v1 == v2));
|
||||
REQUIRE(not (v1 > v2));
|
||||
REQUIRE(not (v1 >= v2));
|
||||
REQUIRE(not(v1 == v2));
|
||||
REQUIRE(not(v1 > v2));
|
||||
REQUIRE(not(v1 >= v2));
|
||||
v1.major += 1;
|
||||
REQUIRE(v1 == v2);
|
||||
REQUIRE(v1 <= v2);
|
||||
REQUIRE(v1 >= v2);
|
||||
REQUIRE(not (v1 != v2));
|
||||
REQUIRE(not (v1 > v2));
|
||||
REQUIRE(not (v1 < v2));
|
||||
REQUIRE(not(v1 != v2));
|
||||
REQUIRE(not(v1 > v2));
|
||||
REQUIRE(not(v1 < v2));
|
||||
v1.major += 1;
|
||||
v1.minor -= 1;
|
||||
REQUIRE(v1 != v2);
|
||||
REQUIRE(v1 > v2);
|
||||
REQUIRE(v1 >= v2);
|
||||
REQUIRE(not (v1 == v2));
|
||||
REQUIRE(not (v1 < v2));
|
||||
REQUIRE(not (v1 <= v2));
|
||||
REQUIRE(not(v1 == v2));
|
||||
REQUIRE(not(v1 < v2));
|
||||
REQUIRE(not(v1 <= v2));
|
||||
v1.major -= 1;
|
||||
v1.minor += 2;
|
||||
v1.revision -= 1;
|
||||
REQUIRE(v1 != v2);
|
||||
REQUIRE(v1 > v2);
|
||||
REQUIRE(v1 >= v2);
|
||||
REQUIRE(not (v1 == v2));
|
||||
REQUIRE(not (v1 < v2));
|
||||
REQUIRE(not (v1 <= v2));
|
||||
REQUIRE(not(v1 == v2));
|
||||
REQUIRE(not(v1 < v2));
|
||||
REQUIRE(not(v1 <= v2));
|
||||
v1.minor -= 1;
|
||||
v1.revision += 2;
|
||||
REQUIRE(v1 != v2);
|
||||
REQUIRE(v1 > v2);
|
||||
REQUIRE(v1 >= v2);
|
||||
REQUIRE(not (v1 == v2));
|
||||
REQUIRE(not (v1 < v2));
|
||||
REQUIRE(not (v1 <= v2));
|
||||
REQUIRE(not(v1 == v2));
|
||||
REQUIRE(not(v1 < v2));
|
||||
REQUIRE(not(v1 <= v2));
|
||||
v1.revision -= 1;
|
||||
REQUIRE(v1 == v2);
|
||||
REQUIRE(v1 <= v2);
|
||||
REQUIRE(v1 >= v2);
|
||||
REQUIRE(not (v1 != v2));
|
||||
REQUIRE(not(v1 != v2));
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::info << "v" << fsfw::FSFW_VERSION << std::endl;
|
||||
#endif
|
||||
char verString[10] = {};
|
||||
fsfw::FSFW_VERSION.getVersion(verString, sizeof(verString));
|
||||
#if FSFW_DISABLE_PRINTOUT == 0
|
||||
printf("v%s\n",verString);
|
||||
printf("v%s\n", verString);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user