From f883fe95140908a02cb00a3234b426e3d9ad5147 Mon Sep 17 00:00:00 2001 From: elral <3263285+elral@users.noreply.github.com> Date: Wed, 10 Jan 2024 13:13:57 +0100 Subject: [PATCH] Add core version (#309) * add core version in OnGetInfo * for Core FW both versions are always the same --- get_version.py | 10 ++++++++-- src/Config.cpp | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/get_version.py b/get_version.py index a1f94183..4a443427 100644 --- a/get_version.py +++ b/get_version.py @@ -15,11 +15,17 @@ firmware_version = firmware_version.lstrip("v") firmware_version = firmware_version.strip(".") +# The community devices have a slightly different version where the +# core firmware version is defined within there .ini file +# For the core FW both versions are always the same +core_firmware_version = firmware_version + print(f'Using version {firmware_version} for the build') +print(f'Using version {core_firmware_version} as core version') -# Append the version to the build defines so it gets baked into the firmware +# Append the version and core version to the build defines so it gets baked into the firmware env.Append(CPPDEFINES=[ - f'BUILD_VERSION={firmware_version}' + f'BUILD_VERSION={firmware_version}', f'CORE_BUILD_VERSION={core_firmware_version}' ]) # Set the output filename to the name of the board and the version diff --git a/src/Config.cpp b/src/Config.cpp index 51315bfb..69ca9e7a 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -48,6 +48,7 @@ #define STRINGIZER(arg) #arg #define STR_VALUE(arg) STRINGIZER(arg) #define VERSION STR_VALUE(BUILD_VERSION) +#define CORE_VERSION STR_VALUE(CORE_BUILD_VERSION) MFEEPROM MFeeprom; @@ -554,6 +555,7 @@ void OnGetInfo() cmdMessenger.sendCmdArg(name); cmdMessenger.sendCmdArg(serial); cmdMessenger.sendCmdArg(VERSION); + cmdMessenger.sendCmdArg(CORE_VERSION); cmdMessenger.sendCmdEnd(); }