Update FSFW #45

Merged
meierj merged 26 commits from mueller/master into eive/develop 2022-03-25 14:56:19 +01:00
2 changed files with 12 additions and 5 deletions
Showing only changes of commit 17262a1da9 - Show all commits

View File

@ -1,12 +1,22 @@
#include "version.h" #include "version.h"
#include "fsfw/FSFWVersion.h" #include "fsfw/FSFWVersion.h"
#include <cstdio>
#ifdef major
#undef major #undef major
#endif
#ifdef minor
#undef minor #undef minor
#endif
const fsfw::Version fsfw::FSFW_VERSION = {FSFW_VERSION_MAJOR, FSFW_VERSION_MINOR, const fsfw::Version fsfw::FSFW_VERSION = {FSFW_VERSION_MAJOR, FSFW_VERSION_MINOR,
FSFW_VERSION_REVISION}; FSFW_VERSION_REVISION};
fsfw::Version::Version(uint32_t major, uint32_t minor, uint32_t revision) fsfw::Version::Version(uint32_t major, uint32_t minor, uint32_t revision)
: major(major), minor(minor), revision(revision) {} : major(major), minor(minor), revision(revision) {}
void fsfw::Version::getVersion(char* str, size_t maxLen) const {
snprintf(str, maxLen, "%d.%d.%d", major, minor, revision);
}

View File

@ -7,7 +7,6 @@
#include <iostream> #include <iostream>
#endif #endif
#include <cstdint> #include <cstdint>
#include <cstdio>
namespace fsfw { namespace fsfw {
@ -53,9 +52,7 @@ class Version {
* @param str * @param str
* @param maxLen * @param maxLen
*/ */
void getVersion(char* str, size_t maxLen) const { void getVersion(char* str, size_t maxLen) const;
snprintf(str, maxLen, "%d.%d.%d", major, minor, revision);
}
}; };
extern const fsfw::Version FSFW_VERSION; extern const fsfw::Version FSFW_VERSION;