Skip to content

Commit

Permalink
Fixed data reader creation return value handling
Browse files Browse the repository at this point in the history
  • Loading branch information
kordets committed Jan 17, 2025
1 parent a13f422 commit 44fb97d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/uxrce_dds_client/dds_topics.h.em
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ bool RcvTopicsPubs::init(uxrSession *session, uxrStreamId reliable_out_stream_id
@[ for idx, sub in enumerate(subscriptions)]@
{
uint16_t queue_depth = uORB::DefaultQueueSize<@(sub['simple_base_type'])_s>::value * 2; // use a bit larger queue size than internal
ret = create_data_reader(session, reliable_out_stream_id, best_effort_in_stream_id, participant_id, @(idx), client_namespace, "@(sub['topic_name'])", "@(sub['dds_type'])", queue_depth);
ret = ret & create_data_reader(session, reliable_out_stream_id, best_effort_in_stream_id, participant_id, @(idx), client_namespace, "@(sub['topic_name'])", "@(sub['dds_type'])", queue_depth);
}
@[ end for]@

Expand Down
2 changes: 2 additions & 0 deletions src/modules/uxrce_dds_client/utilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ static bool create_data_reader(uxrSession *session, uxrStreamId reliable_out_str
PX4_ERR("create entities failed: %s %i %i %i", topic_name,
status[0], status[1], status[2]);
return false;
} else {
PX4_INFO("successfully created %s data reader, topic id: %d", topic_name, topic_id.id);
}

uxrDeliveryControl delivery_control{};
Expand Down

0 comments on commit 44fb97d

Please sign in to comment.