From 0bdadf5de56234760283866ca6a67cb11202d748 Mon Sep 17 00:00:00 2001 From: Matt Condino Date: Wed, 6 Apr 2022 09:46:22 -0700 Subject: [PATCH] use size instead of max_size --- src/rqt_plot/plot_widget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rqt_plot/plot_widget.py b/src/rqt_plot/plot_widget.py index 189c9b9..579dacb 100644 --- a/src/rqt_plot/plot_widget.py +++ b/src/rqt_plot/plot_widget.py @@ -124,10 +124,10 @@ def get_plot_fields(node, topic_name): if not has_index: return [], base_error_msg + f'{name} is a nested type but not index provided' if current_type.has_maximum_size(): - if index >= current_type.maximum_size: + if index >= current_type.size: return [], ( base_error_msg + - f"index '{index}' out of bounds, maximum size is {current_type.maximum_size}") + f"index '{index}' out of bounds, maximum size is {current_type.size}") current_type = current_type.value_type elif has_index: return [], base_error_msg + "{name} is not an array or sequence"