mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
generate_listener.py: fix listener command
the loop variable i was increased even if no topic was updated. This means less messages are outputed than specified.
This commit is contained in:
@@ -158,9 +158,9 @@ for index,m in enumerate(messages[1:]):
|
||||
print("\t\twhile(i < num_msgs) {")
|
||||
print("\t\t\torb_check(sub,&updated);")
|
||||
print("\t\t\tif (i == 0) { updated = true; } else { usleep(500); }")
|
||||
print("\t\t\ti++;")
|
||||
print("\t\t\tif (updated) {")
|
||||
print("\t\tprintf(\"\\nTOPIC: %s #%%d\\n\", i);" % m)
|
||||
print("\t\t\ti++;")
|
||||
print("\t\t\tprintf(\"\\nTOPIC: %s #%%d\\n\", i);" % m)
|
||||
print("\t\t\torb_copy(ID,sub,&container);")
|
||||
for item in message_elements[index+1]:
|
||||
if item[0] == "float":
|
||||
|
||||
Reference in New Issue
Block a user