px4esc-v1 bootloader uses common board api for UUID

This commit is contained in:
David Sidrane 2017-01-24 14:35:18 -10:00 committed by Lorenz Meier
parent 796a7a1a69
commit 147ed3067d
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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;
}
/****************************************************************************