mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08: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\twhile(i < num_msgs) {")
|
||||||
print("\t\t\torb_check(sub,&updated);")
|
print("\t\t\torb_check(sub,&updated);")
|
||||||
print("\t\t\tif (i == 0) { updated = true; } else { usleep(500); }")
|
print("\t\t\tif (i == 0) { updated = true; } else { usleep(500); }")
|
||||||
print("\t\t\ti++;")
|
|
||||||
print("\t\t\tif (updated) {")
|
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);")
|
print("\t\t\torb_copy(ID,sub,&container);")
|
||||||
for item in message_elements[index+1]:
|
for item in message_elements[index+1]:
|
||||||
if item[0] == "float":
|
if item[0] == "float":
|
||||||
|
|||||||
Reference in New Issue
Block a user