mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
dronecan: don't init if can interface fails to init
This commit is contained in:
parent
585e5d1482
commit
2625c5211b
@ -705,11 +705,12 @@ UavcanNode::Run()
|
||||
|
||||
if (can_init_res < 0) {
|
||||
PX4_ERR("CAN driver init failed %i", can_init_res);
|
||||
|
||||
} else {
|
||||
_instance->init(node_id, can->driver.updateEvent());
|
||||
|
||||
_node_init = true;
|
||||
}
|
||||
|
||||
_instance->init(node_id, can->driver.updateEvent());
|
||||
|
||||
_node_init = true;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&_node_mutex);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user