UavcanNode:Support optional board_app_shared_read

This commit is contained in:
David Sidrane 2023-10-20 03:43:40 -07:00 committed by David Sidrane
parent 479c1524b1
commit 1a2a02b7ae
1 changed files with 8 additions and 1 deletions

View File

@ -743,8 +743,15 @@ extern "C" int uavcannode_start(int argc, char *argv[])
int32_t node_id = 0;
// Did the bootloader auto baud and get a node ID Allocated
int valid = -1;
bootloader_app_shared_t shared;
int valid = bootloader_app_shared_read(&shared, BootLoader);
if (board_app_shared_read) {
valid = board_app_shared_read(&shared, BootLoader);
} else {
valid = bootloader_app_shared_read(&shared, BootLoader);
}
if (valid == 0) {