mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
refactor uxrce_dds_client: reduce amount of generated code for SendTopicsSubs
Reduces flash usage by ~4KB for current set of topics.
This commit is contained in:
@@ -124,8 +124,9 @@ static inline constexpr int ucdr_topic_size_@(topic)()
|
||||
return @(struct_size);
|
||||
}
|
||||
|
||||
bool ucdr_serialize_@(topic)(const @(uorb_struct)& topic, ucdrBuffer& buf, int64_t time_offset = 0)
|
||||
bool ucdr_serialize_@(topic)(const void* data, ucdrBuffer& buf, int64_t time_offset = 0)
|
||||
{
|
||||
const @(uorb_struct)& topic = *static_cast<const @(uorb_struct)*>(data);
|
||||
@{
|
||||
for field_type, field_name, field_size, padding in fields:
|
||||
if padding > 0:
|
||||
|
||||
Reference in New Issue
Block a user