From f5158d47254a093e9ba100f1bc22962e83febb92 Mon Sep 17 00:00:00 2001 From: Frank Date: Sun, 14 Jan 2024 10:26:16 +0100 Subject: [PATCH] Enhancement: Add info about compiled modules to version string --- src/app.cpp | 23 ++++++++++++++++++++++- src/app.h | 2 +- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/app.cpp b/src/app.cpp index 8cbe775d..80f2083e 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -465,7 +465,28 @@ void app:: zeroIvValues(bool checkAvail, bool skipYieldDay) { //----------------------------------------------------------------------------- void app::resetSystem(void) { - snprintf(mVersion, 12, "%d.%d.%d", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH); + snprintf(mVersion, sizeof(mVersion), "%d.%d.%d%s", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, + "-" +#ifdef ENABLE_PROMETHEUS_EP + "P" +#endif + +#ifdef ENABLE_MQTT + "M" +#endif + +#ifdef PLUGIN_DISPLAY + "D" +#endif + +#ifdef ENABLE_HISTORY + "H" +#endif + +#ifdef AP_ONLY + "A" +#endif + ); #ifdef AP_ONLY mTimestamp = 1; diff --git a/src/app.h b/src/app.h index 194f291e..8da8f3f7 100644 --- a/src/app.h +++ b/src/app.h @@ -386,7 +386,7 @@ class app : public IApp, public ah::Scheduler { CmtRadio<> mCmtRadio; #endif - char mVersion[12]; + char mVersion[18]; settings mSettings; settings_t *mConfig; bool mSavePending;