mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 02:16:53 +08:00
urtps templates: minor cleanup
This commit is contained in:
@@ -18,7 +18,7 @@ import gencpp
|
|||||||
from px_generate_uorb_topic_helper import * # this is in Tools/
|
from px_generate_uorb_topic_helper import * # this is in Tools/
|
||||||
from px_generate_uorb_topic_files import MsgScope # this is in Tools/
|
from px_generate_uorb_topic_files import MsgScope # this is in Tools/
|
||||||
|
|
||||||
topic_names = [s.short_name for idx, s in enumerate(spec)]
|
topic_names = [s.short_name for s in spec]
|
||||||
send_topics = [(alias[idx] if alias[idx] else s.short_name) for idx, s in enumerate(spec) if scope[idx] == MsgScope.SEND]
|
send_topics = [(alias[idx] if alias[idx] else s.short_name) for idx, s in enumerate(spec) if scope[idx] == MsgScope.SEND]
|
||||||
send_base_types = [s.short_name for idx, s in enumerate(spec) if scope[idx] == MsgScope.SEND]
|
send_base_types = [s.short_name for idx, s in enumerate(spec) if scope[idx] == MsgScope.SEND]
|
||||||
recv_topics = [(alias[idx] if alias[idx] else s.short_name) for idx, s in enumerate(spec) if scope[idx] == MsgScope.RECEIVE]
|
recv_topics = [(alias[idx] if alias[idx] else s.short_name) for idx, s in enumerate(spec) if scope[idx] == MsgScope.RECEIVE]
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ void RtpsTopics::publish(uint8_t topic_ID, char data_buffer[], size_t len)
|
|||||||
{
|
{
|
||||||
switch (topic_ID)
|
switch (topic_ID)
|
||||||
{
|
{
|
||||||
@[for idx, topic in enumerate(send_topics)]@
|
@[for topic in send_topics]@
|
||||||
case @(rtps_message_id(ids, topic)): // @(topic)
|
case @(rtps_message_id(ids, topic)): // @(topic)
|
||||||
{
|
{
|
||||||
@(topic)_ st;
|
@(topic)_ st;
|
||||||
|
|||||||
Reference in New Issue
Block a user