Skip to content

Commit

Permalink
generate_listener.py don't use message length
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Oct 28, 2019
1 parent a59a0b6 commit 17d0073
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/systemcmds/topic_listener/generate_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@

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 {")
Expand Down

0 comments on commit 17d0073

Please sign in to comment.