mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 13:20:35 +08:00
logger uses board_get_uuid_formated32 instead of mcu_unique_id
Replace the creation of uuid string with the board common api board_get_uuid_formated32 as opposed to using mcu_unique_id and printf.
This commit is contained in:
committed by
Lorenz Meier
parent
e6ba897b9a
commit
5c239ffb0b
@@ -31,6 +31,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <px4_config.h>
|
||||
#include "logger.h"
|
||||
#include "messages.h"
|
||||
|
||||
@@ -1439,10 +1440,8 @@ void Logger::write_version()
|
||||
param_get(write_uuid_param, &write_uuid);
|
||||
|
||||
if (write_uuid == 1) {
|
||||
uint32_t uuid[3];
|
||||
mcu_unique_id(uuid);
|
||||
char uuid_string[sizeof(uint32_t) * 3 * 2 + 1];
|
||||
snprintf(uuid_string, sizeof(uuid_string), "%08x%08x%08x", uuid[0], uuid[1], uuid[2]);
|
||||
char uuid_string[PX4_CPU_UUID_WORD32_LEGACY_FORMAT_SIZE];
|
||||
board_get_uuid_formated32(uuid_string, sizeof(uuid_string), "%08X", NULL, &px4_legacy_word32_order);
|
||||
write_info("sys_uuid", uuid_string);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user