mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
micro-CDR: bump submodule version and update CMake and src code
This commit is contained in:
parent
d80da97ef5
commit
4c5e5acefe
@ -85,7 +85,7 @@ void* send(void* /*unused*/)
|
||||
uint64_t sent = 0, total_sent = 0;
|
||||
int loop = 0, read = 0;
|
||||
uint32_t length = 0;
|
||||
uint16_t header_length = 0;
|
||||
size_t header_length = 0;
|
||||
|
||||
/* subscribe to topics */
|
||||
@[for idx, topic in enumerate(send_topics)]@
|
||||
|
||||
@ -170,7 +170,7 @@ std::queue<uint8_t> t_send_queue;
|
||||
void t_send(void *data)
|
||||
{
|
||||
char data_buffer[BUFFER_SIZE] = {};
|
||||
int length = 0;
|
||||
uint32_t length = 0;
|
||||
|
||||
while (running && !exit_sender_thread.load())
|
||||
{
|
||||
@ -183,7 +183,7 @@ void t_send(void *data)
|
||||
t_send_queue.pop();
|
||||
lk.unlock();
|
||||
|
||||
uint16_t header_length = transport_node->get_header_length();
|
||||
size_t header_length = transport_node->get_header_length();
|
||||
/* make room for the header to fill in later */
|
||||
eprosima::fastcdr::FastBuffer cdrbuffer(&data_buffer[header_length], sizeof(data_buffer)-header_length);
|
||||
eprosima::fastcdr::Cdr scdr(cdrbuffer);
|
||||
|
||||
@ -213,7 +213,7 @@ ssize_t Transport_node::read(uint8_t *topic_ID, char out_buffer[], size_t buffer
|
||||
return len;
|
||||
}
|
||||
|
||||
ssize_t Transport_node::get_header_length()
|
||||
size_t Transport_node::get_header_length()
|
||||
{
|
||||
return sizeof(struct Header);
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ public:
|
||||
ssize_t write(const uint8_t topic_ID, char buffer[], size_t length);
|
||||
|
||||
/** Get the Length of struct Header to make headroom for the size of struct Header along with payload */
|
||||
ssize_t get_header_length();
|
||||
size_t get_header_length();
|
||||
|
||||
protected:
|
||||
virtual ssize_t node_read(void *buffer, size_t len) = 0;
|
||||
|
||||
@ -87,10 +87,6 @@ if (FASTRTPSGEN AND (config_rtps_send_topics OR config_rtps_receive_topics))
|
||||
endif()
|
||||
|
||||
if (GENERATE_RTPS_BRIDGE)
|
||||
|
||||
# temporarily set to OFF
|
||||
option(CHECK_ENDIANNESS OFF)
|
||||
|
||||
add_subdirectory(micrortps_client)
|
||||
|
||||
###############################################################################
|
||||
@ -98,6 +94,8 @@ if (GENERATE_RTPS_BRIDGE)
|
||||
###############################################################################
|
||||
include(px4_git)
|
||||
px4_add_git_submodule(TARGET git_micro_cdr PATH micro-CDR)
|
||||
|
||||
set(UCDR_SUPERBUILD CACHE BOOL "Disable micro-CDR superbuild compilation.")
|
||||
add_subdirectory(micro-CDR)
|
||||
|
||||
set(msg_out_path_microcdr ${PX4_BINARY_DIR}/uORB_microcdr/topics)
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 62d95c870eafb0cccc7bf70bb8a0cbb86f125a0e
|
||||
Subproject commit a4927629115de47b5545632b91ad17df55f2d20d
|
||||
Loading…
x
Reference in New Issue
Block a user