Skip to content

Commit

Permalink
Merge pull request #262 from trainman419/fix_261
Browse files Browse the repository at this point in the history
Handle variable-sized arrays. Fixes #261
  • Loading branch information
ablasdel committed Aug 11, 2014
2 parents 72b78cf + bee21f7 commit 49f0b7e
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 49f0b7e

Please sign in to comment.