uavcan: fix driver init after stop/start (#25511)

This commit is contained in:
Alexander Lerach
2025-09-02 10:02:15 -08:00
committed by GitHub
parent ce207837cf
commit 9015001b42
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -505,12 +505,16 @@ void UavcanNode::Run()
if (can_init_res < 0) {
PX4_ERR("CAN driver init failed %i", can_init_res);
ScheduleClear();
return;
}
int rv = _node.start();
if (rv < 0) {
PX4_ERR("Failed to start the node");
ScheduleClear();
return;
}
// If the node_id was not supplied by the bootloader do Dynamic Node ID allocation
@@ -528,6 +532,8 @@ void UavcanNode::Run()
if (client_start_res < 0) {
PX4_ERR("Failed to start the dynamic node ID client");
ScheduleClear();
return;
}
}
}