Skip to content

Commit

Permalink
AP_DroneCAN: don't set node if if value is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
bugobliterator committed Dec 21, 2023
1 parent 01e89c2 commit edb62c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libraries/AP_DroneCAN/AP_Canard_iface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ Interface(iface_index) {

void CanardInterface::init(void* mem_arena, size_t mem_arena_size, uint8_t node_id) {
canardInit(&canard, mem_arena, mem_arena_size, onTransferReception, shouldAcceptTransfer, this);
canardSetLocalNodeID(&canard, node_id);
if (node_id != 0) {
canardSetLocalNodeID(&canard, node_id);
}
initialized = true;
}

Expand Down

0 comments on commit edb62c9

Please sign in to comment.