From f07db2b758cc5783f1e7b5f336394e8e5d5de368 Mon Sep 17 00:00:00 2001 From: Kristiana Rendon Date: Tue, 31 Oct 2017 15:45:20 -0600 Subject: [PATCH] Reset Obstacle Call Count The obstacle call count will reset only if there are no rovers connected to the GUI. Else, it will continue to count obstacles globally. This fixes issue #93. --- src/rqt_rover_gui/src/rover_gui_plugin.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/rqt_rover_gui/src/rover_gui_plugin.cpp b/src/rqt_rover_gui/src/rover_gui_plugin.cpp index 01e26e49..c5620d6f 100644 --- a/src/rqt_rover_gui/src/rover_gui_plugin.cpp +++ b/src/rqt_rover_gui/src/rover_gui_plugin.cpp @@ -1,6 +1,6 @@ // Author: Matthew Fricke // E-mail: matthew@fricke.co.uk -// Date: 9-16-205 +// Date: 9-16-2015 // Purpose: implementation of a simple graphical front end for the UNM-NASA Swarmathon rovers. // License: GPL3 @@ -707,6 +707,12 @@ void RoverGUIPlugin::currentRoverChangedEventHandler(QListWidgetItem *current, Q void RoverGUIPlugin::pollRoversTimerEventHandler() { + //If there are no rovers connected to the GUI, reset the obstacle call count to 0 + if(ui.rover_list->count() == 0) + { + obstacle_call_count = 0; + } + // Returns rovers that have created a status topic setnew_rover_names = findConnectedRovers();