Skip to content

Commit

Permalink
Check for window_size < 0 when constructing ROSTopicBandwidth object
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikmohta committed Aug 12, 2017
1 parent 4c74df9 commit 86a2a29
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/rostopic/src/rostopic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,11 @@ def __init__(self, window_size=100):
self.lock = threading.Lock()
self.last_printed_tn = 0
self.sizes =[]
self.times =[]
self.window_size = window_size or 100

self.times =[]
if window_size < 0:
window_size = 100
self.window_size = window_size

def callback(self, data):
"""ros sub callback"""
with self.lock:
Expand Down

0 comments on commit 86a2a29

Please sign in to comment.