mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-07-24 15:27:41 +08:00
feat(docs): sort dds topics, fix formatting (#27794)
This commit is contained in:
@@ -867,17 +867,17 @@ Topic | Type| Rate Limit
|
||||
--- | --- | ---
|
||||
"""
|
||||
|
||||
for message in data["publications"]:
|
||||
for message in sorted(data["publications"], key=lambda elem: elem['topic']):
|
||||
type = message['type']
|
||||
px4Type=type.split("::")[-1]
|
||||
dds_markdown += f"`{message['topic']}` | [{type}](../msg_docs/{px4Type}.md) | {message.get('rate_limit','')}\n"
|
||||
|
||||
dds_markdown += "\n## Subscriptions\n\nTopic | Type\n--- | ---\n"
|
||||
|
||||
for message in data["subscriptions"]:
|
||||
for message in sorted(data["subscriptions"], key=lambda elem: elem['topic']):
|
||||
type = message['type']
|
||||
px4Type=type.split("::")[-1]
|
||||
dds_markdown += f"{message['topic']} | [{type}](../msg_docs/{px4Type}.md)\n"
|
||||
dds_markdown += f"`{message['topic']}` | [{type}](../msg_docs/{px4Type}.md)\n"
|
||||
|
||||
dds_markdown += "\n## Subscriptions Multi\n\n"
|
||||
|
||||
@@ -897,7 +897,7 @@ Topic | Type| Rate Limit
|
||||
# Print the topics that are not exported to DDS
|
||||
dds_markdown += "\n## Not Exported\n\nThese messages are not listed in the yaml file.\nThey are not build into the module, and hence are neither published or subscribed."
|
||||
dds_markdown += "\n\n::: details See messages\n"
|
||||
for item in messagesNotExported:
|
||||
for item in sorted(messagesNotExported):
|
||||
dds_markdown += f"\n- [{item}](../msg_docs/{item}.md)"
|
||||
dds_markdown += "\n:::\n" # End of details block
|
||||
|
||||
|
||||
Reference in New Issue
Block a user