From 28efb324b5aa3062992c1d7775fea748862120ed Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Wed, 15 May 2024 10:33:38 +0300 Subject: [PATCH] src/systemcmds/ver/ver.cpp: Add printing of accelerator version If board defines PX4_ACCEL_VERSION, the "ver all" prints accelerator version Signed-off-by: Jukka Laitinen --- src/systemcmds/ver/ver.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/systemcmds/ver/ver.cpp b/src/systemcmds/ver/ver.cpp index 944164163663..d207ad55f4a8 100644 --- a/src/systemcmds/ver/ver.cpp +++ b/src/systemcmds/ver/ver.cpp @@ -50,6 +50,9 @@ #ifndef PX4_BL_VERSION #define PX4_BL_VERSION NULL #endif +#ifndef PX4_ACCEL_VERSION +#define PX4_ACCEL_VERSION NULL +#endif /* string constants for version commands */ static const char sz_ver_hw_str[] = "hw"; @@ -188,6 +191,11 @@ extern "C" __EXPORT int ver_main(int argc, char *argv[]) printf("Bootloader version: %s\n", bl_version); } + const char *accel_version = PX4_ACCEL_VERSION; + + if (accel_version) { + printf("Accelerator version: %s\n", accel_version); + } } fwver = px4_firmware_vendor_version();