From e4306ffd5d9f25a93e9e59d0158bbac7079ee80b Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Tue, 3 Oct 2023 14:52:37 +0300 Subject: [PATCH] Add printing of bootloader version into "ver" systemcommand Signed-off-by: Jukka Laitinen --- src/systemcmds/ver/ver.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/systemcmds/ver/ver.cpp b/src/systemcmds/ver/ver.cpp index ab75009d1ec5..944164163663 100644 --- a/src/systemcmds/ver/ver.cpp +++ b/src/systemcmds/ver/ver.cpp @@ -47,6 +47,10 @@ #include #include +#ifndef PX4_BL_VERSION +#define PX4_BL_VERSION NULL +#endif + /* string constants for version commands */ static const char sz_ver_hw_str[] = "hw"; static const char sz_ver_hwcmp_str[] = "hwcmp"; @@ -177,6 +181,13 @@ extern "C" __EXPORT int ver_main(int argc, char *argv[]) if (git_branch && git_branch[0]) { PX4_INFO_RAW("PX4 git-branch: %s\n", git_branch); } + + const char *bl_version = PX4_BL_VERSION; + + if (bl_version) { + printf("Bootloader version: %s\n", bl_version); + } + } fwver = px4_firmware_vendor_version();