mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
px4esc-v1 bootloader uses common board api for UUID
This commit is contained in:
parent
796a7a1a69
commit
147ed3067d
@ -49,6 +49,7 @@ px4_add_module(
|
||||
SRCS
|
||||
boot.c
|
||||
led.c
|
||||
../../common/stm32/board_identity.c
|
||||
${px4_bootloader_base}src/uavcan/main.c
|
||||
${px4_bootloader_base}src/common/boot_app_shared.c
|
||||
${px4_bootloader_base}src/sched/timer.c
|
||||
|
||||
@ -162,14 +162,13 @@ uint8_t board_get_product_name(uint8_t *product_name, size_t maxlen)
|
||||
|
||||
size_t board_get_hardware_version(uavcan_HardwareVersion_t *hw_version)
|
||||
{
|
||||
size_t length = 12;
|
||||
memset(hw_version, 0 , sizeof(uavcan_HardwareVersion_t));
|
||||
|
||||
hw_version->major = HW_VERSION_MAJOR;
|
||||
hw_version->minor = HW_VERSION_MINOR;
|
||||
|
||||
memcpy(hw_version->unique_id, (void *) STM32_SYSMEM_UID, length);
|
||||
return length;
|
||||
board_get_uuid_raw((raw_uuid_byte_t *) hw_version->unique_id);
|
||||
return PX4_CPU_UUID_BYTE_LENGTH;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user