Skip to content
Snippets Groups Projects
Commit 39a00212 authored by David Sidrane's avatar David Sidrane Committed by Beat Küng
Browse files

ver:Add PX4 GUID (MFGUID and UID will be deprecated later)

parent 7050657a
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,7 @@ static const char sz_ver_all_str[] = "all";
static const char mcu_ver_str[] = "mcu";
static const char mcu_uid_str[] = "uid";
static const char mfg_uid_str[] = "mfguid";
static const char px4_guid_str[] = "px4guid";
#if defined(PX4_CPU_UUID_WORD32_FORMAT)
# define CPU_UUID_FORMAT PX4_CPU_UUID_WORD32_FORMAT
......@@ -90,6 +91,7 @@ static void usage(const char *reason)
PRINT_MODULE_USAGE_COMMAND_DESCR("bdate", "Build date and time");
PRINT_MODULE_USAGE_COMMAND_DESCR("uid", "UUID");
PRINT_MODULE_USAGE_COMMAND_DESCR("mfguid", "Manufacturer UUID");
PRINT_MODULE_USAGE_COMMAND_DESCR("px4guid", "PX4 GUID");
PRINT_MODULE_USAGE_COMMAND_DESCR("uri", "Build URI");
PRINT_MODULE_USAGE_COMMAND_DESCR("all", "Print all versions");
......@@ -244,6 +246,18 @@ int ver_main(int argc, char *argv[])
ret = 0;
}
if (show_all || !strncmp(argv[1], px4_guid_str, sizeof(px4_guid_str))) {
#if defined(BOARD_OVERRIDE_PX4_GUID)
char *px4guid_fmt_buffer = BOARD_OVERRIDE_PX4_GUID;
#else
char px4guid_fmt_buffer[PX4_GUID_FORMAT_SIZE];
board_get_px4_guid_formated(px4guid_fmt_buffer, sizeof(px4guid_fmt_buffer));
#endif
printf("PX4GUID: %s\n", px4guid_fmt_buffer);
ret = 0;
}
if (show_all || !strncmp(argv[1], mcu_ver_str, sizeof(mcu_ver_str))) {
char rev = ' ';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment