mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-12 09:51:19 +08:00
f003fc39cb
When all subscription topics are commented out in dds_topics.yaml, the build failed in two ways: 1. KeyError in generate_dds_topics.py when the subscriptions key is absent from YAML — fixed by using dict.get() with fallback to empty list, consistent with how subscriptions_multi is handled. 2. Unused variable errors (-Werror) in the generated dds_topics.h when no subscriptions exist — fixed by guarding on_topic_update(), time_offset_us, and uxr_set_topic_callback() with conditional template blocks. Also marked create_data_reader() as __attribute__((unused)) since it is only called from generated subscription code. Closes #26799 Signed-off-by: Pavel Guzenfeld <pavelgu@gmail.com>