apps/examples/uavcan: Remove call to boardctl()
This commit is contained in:
parent
bebee5b89a
commit
2aeaff042d
@ -6,7 +6,7 @@
|
|||||||
config EXAMPLES_UAVCAN
|
config EXAMPLES_UAVCAN
|
||||||
bool "UAVCAN example"
|
bool "UAVCAN example"
|
||||||
default n
|
default n
|
||||||
depends on CANUTILS_UAVCAN && LIB_BOARDCTL
|
depends on CANUTILS_UAVCAN
|
||||||
---help---
|
---help---
|
||||||
Enable the UAVCAN example
|
Enable the UAVCAN example
|
||||||
|
|
||||||
|
@ -39,8 +39,6 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <sys/boardctl.h>
|
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
@ -67,17 +65,9 @@ int main(int argc, FAR char *argv[])
|
|||||||
extern "C" int uavcan_main(int argc, FAR char *argv[])
|
extern "C" int uavcan_main(int argc, FAR char *argv[])
|
||||||
#endif
|
#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<CONFIG_EXAMPLES_UAVCAN_NODE_MEM_POOL_SIZE>
|
uavcan::Node<CONFIG_EXAMPLES_UAVCAN_NODE_MEM_POOL_SIZE>
|
||||||
node(getCanDriver(), getSystemClock());
|
node(getCanDriver(), getSystemClock());
|
||||||
|
int ret;
|
||||||
|
|
||||||
node.setNodeID(CONFIG_EXAMPLES_UAVCAN_NODE_ID);
|
node.setNodeID(CONFIG_EXAMPLES_UAVCAN_NODE_ID);
|
||||||
node.setName(CONFIG_EXAMPLES_UAVCAN_NODE_NAME);
|
node.setName(CONFIG_EXAMPLES_UAVCAN_NODE_NAME);
|
||||||
|
Loading…
Reference in New Issue
Block a user