forked from Archive/PX4-Autopilot
ver:Removed UUID and MFGID
This commit is contained in:
parent
bdaff018b7
commit
66102adf43
|
@ -57,23 +57,8 @@ static const char sz_ver_buri_str[] = "uri";
|
|||
static const char sz_ver_gcc_str[] = "gcc";
|
||||
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
|
||||
#else
|
||||
/* This is the legacy format that did not print leading zeros*/
|
||||
# define CPU_UUID_FORMAT "%X"
|
||||
#endif
|
||||
|
||||
#if defined(PX4_CPU_UUID_WORD32_SEPARATOR)
|
||||
# define CPU_UUID_SEPARATOR PX4_CPU_UUID_WORD32_SEPARATOR
|
||||
#else
|
||||
# define CPU_UUID_SEPARATOR ":"
|
||||
#endif
|
||||
|
||||
static void usage(const char *reason)
|
||||
{
|
||||
if (reason != NULL) {
|
||||
|
@ -89,8 +74,6 @@ static void usage(const char *reason)
|
|||
PRINT_MODULE_USAGE_COMMAND_DESCR("bdate", "Build date and time");
|
||||
PRINT_MODULE_USAGE_COMMAND_DESCR("gcc", "Compiler info");
|
||||
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");
|
||||
|
||||
|
@ -234,18 +217,6 @@ int ver_main(int argc, char *argv[])
|
|||
|
||||
}
|
||||
|
||||
if (show_all || !strncmp(argv[1], mfg_uid_str, sizeof(mfg_uid_str))) {
|
||||
|
||||
#if defined(BOARD_OVERRIDE_MFGUID)
|
||||
char *mfguid_fmt_buffer = BOARD_OVERRIDE_MFGUID;
|
||||
#else
|
||||
char mfguid_fmt_buffer[PX4_CPU_MFGUID_FORMAT_SIZE];
|
||||
board_get_mfguid_formated(mfguid_fmt_buffer, sizeof(mfguid_fmt_buffer));
|
||||
#endif
|
||||
printf("MFGUID: %s\n", mfguid_fmt_buffer);
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
if (show_all || !strncmp(argv[1], px4_guid_str, sizeof(px4_guid_str))) {
|
||||
char px4guid_fmt_buffer[PX4_GUID_FORMAT_SIZE];
|
||||
|
||||
|
@ -279,13 +250,6 @@ int ver_main(int argc, char *argv[])
|
|||
ret = 0;
|
||||
}
|
||||
|
||||
if (show_all || !strncmp(argv[1], mcu_uid_str, sizeof(mcu_uid_str))) {
|
||||
char uid_fmt_buffer[PX4_CPU_UUID_WORD32_FORMAT_SIZE];
|
||||
board_get_uuid32_formated(uid_fmt_buffer, sizeof(uid_fmt_buffer), CPU_UUID_FORMAT, CPU_UUID_SEPARATOR);
|
||||
printf("UID: %s \n", uid_fmt_buffer);
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
if (ret == 1) {
|
||||
PX4_ERR("unknown command");
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue