Skip to content

Commit

Permalink
Handle variable-sized arrays. Fixes #261
Browse files Browse the repository at this point in the history
  • Loading branch information
trainman419 committed Jul 29, 2014
1 parent cbef642 commit bee21f7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rqt_plot/src/rqt_plot/plot_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ def get_plot_fields(topic_name):

if field_class in (int, float):
if is_array:
message = "topic %s is a numeric array" % ( topic_name )
return [ "%s[%d]" % (topic_name, i) for i in range(array_size) ], message
if array_size is not None:
message = "topic %s is fixed-size numeric array" % ( topic_name )
return [ "%s[%d]" % (topic_name, i) for i in range(array_size) ], message
else:
message = "topic %s is variable-size numeric array" % ( topic_name )
return [], message
else:
message = "topic %s is numeric" % ( topic_name )
return [ topic_name ], message
Expand Down

0 comments on commit bee21f7

Please sign in to comment.