From 575923b53461c003a16ad17def88331f99704d87 Mon Sep 17 00:00:00 2001 From: Peter van der Perk Date: Wed, 26 Mar 2025 23:21:11 +0100 Subject: [PATCH] Zenoh: fix topic_name and datatype mapping Using substring was buggy instad we make dictionary based on datatypes and the get_topics function --- Tools/zenoh/px_generate_zenoh_topic_files.py | 7 ++++++- Tools/zenoh/templates/zenoh/uorb_pubsub_factory.hpp.em | 6 ++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Tools/zenoh/px_generate_zenoh_topic_files.py b/Tools/zenoh/px_generate_zenoh_topic_files.py index a6f5d12c4b..cfa69f8d99 100755 --- a/Tools/zenoh/px_generate_zenoh_topic_files.py +++ b/Tools/zenoh/px_generate_zenoh_topic_files.py @@ -155,7 +155,12 @@ def generate_topics_list_file_from_files(files, outputdir, template_filename, te for msg_filename in files: topics.extend(get_topics(msg_filename)) - tl_globals = {"msgs": filenames, "topics": topics, "datatypes": datatypes, "full_base_names": full_base_names, "rihs01_hashes": rihs01_hashes} + datatypes_with_topics = dict() + for msg_filename in files: + datatype = re.sub(r'(?o_name);