Compare commits

..

1 Commits

Author SHA1 Message Date
d98ed40e3d add CFDP subsystem ID 2023-03-15 12:09:30 +01:00
2 changed files with 3 additions and 3 deletions

View File

@ -33,6 +33,7 @@ enum : uint8_t {
PUS_SERVICE_23 = 103,
MGM_LIS3MDL = 106,
MGM_RM3100 = 107,
CFDP = 108,
FW_SUBSYSTEM_ID_RANGE
};

View File

@ -1,7 +1,6 @@
#include "version.h"
#include <cstdio>
#include <cstring>
#include "fsfw/FSFWVersion.h"
@ -21,7 +20,7 @@ fsfw::Version::Version(int major, int minor, int revision, const char* addInfo)
void fsfw::Version::getVersion(char* str, size_t maxLen) const {
size_t len = snprintf(str, maxLen, "%d.%d.%d", major, minor, revision);
if (addInfo != nullptr and std::strcmp(addInfo, "") != 0) {
if (addInfo != nullptr) {
snprintf(str + len, maxLen - len, "-%s", addInfo);
}
}
@ -31,7 +30,7 @@ namespace fsfw {
#if FSFW_CPP_OSTREAM_ENABLED == 1
std::ostream& operator<<(std::ostream& os, const Version& v) {
os << v.major << "." << v.minor << "." << v.revision;
if (v.addInfo != nullptr and std::strcmp(v.addInfo, "") != 0) {
if (v.addInfo != nullptr) {
os << "-" << v.addInfo;
}
return os;