mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
generate_listener.py don't use message length
This commit is contained in:
parent
35398e05ca
commit
644c816a2a
@ -119,9 +119,9 @@ print("""
|
||||
|
||||
for index, (m, t) in enumerate(zip(messages, topics)):
|
||||
if index == 0:
|
||||
print("\tif (strncmp(topic_name,\"%s\", %d) == 0) {" % (t, len(t)))
|
||||
print("\tif (strcmp(topic_name,\"%s\") == 0) {" % (t))
|
||||
else:
|
||||
print("\t} else if (strncmp(topic_name,\"%s\", %d) == 0) {" % (t, len(t)))
|
||||
print("\t} else if (strcmp(topic_name,\"%s\") == 0) {" % (t))
|
||||
print("\t\tlistener(listener_print_topic<%s_s>, ORB_ID(%s), num_msgs, topic_instance, topic_interval);" % (m, t))
|
||||
|
||||
print("\t} else {")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user