From 1a2a02b7ae7e30a43fb8b0564b43c501aec84def Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Fri, 20 Oct 2023 03:43:40 -0700 Subject: [PATCH] UavcanNode:Support optional board_app_shared_read --- src/drivers/uavcannode/UavcanNode.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/drivers/uavcannode/UavcanNode.cpp b/src/drivers/uavcannode/UavcanNode.cpp index 2940906c25..f1d71813d2 100644 --- a/src/drivers/uavcannode/UavcanNode.cpp +++ b/src/drivers/uavcannode/UavcanNode.cpp @@ -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) {