Skip to content

Commit

Permalink
Add printing of bootloader version into "ver" systemcommand
Browse files Browse the repository at this point in the history
Signed-off-by: Jukka Laitinen <[email protected]>
  • Loading branch information
jlaitine authored and jnippula committed Oct 4, 2023
1 parent 7ec4554 commit e4306ff
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/systemcmds/ver/ver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
#include <string.h>
#include <version/version.h>

#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";
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit e4306ff

Please sign in to comment.