diff options
-rw-r--r-- | src/CAN/CanInterface.cpp | 2 | ||||
-rw-r--r-- | src/Version.cpp | 14 | ||||
-rw-r--r-- | src/Version.h | 14 |
3 files changed, 17 insertions, 13 deletions
diff --git a/src/CAN/CanInterface.cpp b/src/CAN/CanInterface.cpp index 4dac2518..4dc17ec1 100644 --- a/src/CAN/CanInterface.cpp +++ b/src/CAN/CanInterface.cpp @@ -393,7 +393,7 @@ void CanInterface::SendAnnounce(CanMessageBuffer *buf) noexcept memcpy(msg->uniqueId, reprap.GetPlatform().GetUniqueId().GetRaw(), sizeof(msg->uniqueId)); // Note, board type name, firmware version, firmware date and firmware time are limited to 43 characters in the new // We use vertical-bar to separate the three fields: board type, firmware version, date/time - SafeSnprintf(msg->boardTypeAndFirmwareVersion, ARRAY_SIZE(msg->boardTypeAndFirmwareVersion), "%s|%s|%s%.6s", BOARD_SHORT_NAME, VERSION, IsoDate, TIME_SUFFIX); + SafeSnprintf(msg->boardTypeAndFirmwareVersion, ARRAY_SIZE(msg->boardTypeAndFirmwareVersion), "%s|%s|%s%.6s", BOARD_SHORT_NAME, VERSION, DATE, TIME_SUFFIX); buf->dataLength = msg->GetActualDataLength(); SendMessageNoReplyNoFree(buf); } diff --git a/src/Version.cpp b/src/Version.cpp new file mode 100644 index 00000000..2aa172ee --- /dev/null +++ b/src/Version.cpp @@ -0,0 +1,14 @@ +/* + * Version.cpp + * + * Created on: 12 Aug 2022 + * Author: David + */ + +#include "Version.h" +#include <General/IsoDate.h> + +const char *const DATE = IsoDate; +const char *const TIME_SUFFIX = " " __TIME__; + +// End diff --git a/src/Version.h b/src/Version.h index ee3dbeca..02e7dc30 100644 --- a/src/Version.h +++ b/src/Version.h @@ -19,18 +19,8 @@ # define VERSION MAIN_VERSION VERSION_SUFFIX #endif -#ifndef DATE -# include <General/IsoDate.h> -# define DATE IsoDate -#endif - -#if 0 -// Use this for official releases -# define TIME_SUFFIX -#else -// Use this for internal builds -# define TIME_SUFFIX " " __TIME__ -#endif +extern const char *const DATE; +extern const char *const TIME_SUFFIX; #define AUTHORS "reprappro, dc42, chrishamm, t3p3, dnewman, printm3d" |