diff --git a/examples/uavcan/Kconfig b/examples/uavcan/Kconfig index 2804cf972..6d47c3b57 100644 --- a/examples/uavcan/Kconfig +++ b/examples/uavcan/Kconfig @@ -6,7 +6,7 @@ config EXAMPLES_UAVCAN bool "UAVCAN example" default n - depends on CANUTILS_UAVCAN && LIB_BOARDCTL + depends on CANUTILS_UAVCAN ---help--- Enable the UAVCAN example diff --git a/examples/uavcan/uavcan_main.cxx b/examples/uavcan/uavcan_main.cxx index fb8206416..7181356a0 100644 --- a/examples/uavcan/uavcan_main.cxx +++ b/examples/uavcan/uavcan_main.cxx @@ -39,8 +39,6 @@ #include -#include - #include #include @@ -67,17 +65,9 @@ int main(int argc, FAR char *argv[]) extern "C" int uavcan_main(int argc, FAR char *argv[]) #endif { - int ret; - - ret = boardctl(BOARDIOC_INIT, 0); - if (ret < 0) - { - std::fprintf(stderr, "ERROR: boardctl failed: %d\n", ret); - return EXIT_FAILURE; - } - uavcan::Node node(getCanDriver(), getSystemClock()); + int ret; node.setNodeID(CONFIG_EXAMPLES_UAVCAN_NODE_ID); node.setName(CONFIG_EXAMPLES_UAVCAN_NODE_NAME);