Skip to content

Commit

Permalink
src/systemcmds/ver/ver.cpp: Add printing of accelerator version
Browse files Browse the repository at this point in the history
If board defines PX4_ACCEL_VERSION, the "ver all" prints accelerator version

Signed-off-by: Jukka Laitinen <[email protected]>
  • Loading branch information
jlaitine committed May 15, 2024
1 parent f75a3ca commit b87d1a0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/systemcmds/ver/ver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit b87d1a0

Please sign in to comment.