From 978b9026bd8f5cb2ae6834f3a9ecabfc14f0c4ad Mon Sep 17 00:00:00 2001 From: Jakub Delicat Date: Fri, 11 Aug 2023 15:32:51 +0200 Subject: [PATCH] removed print Signed-off-by: Jakub Delicat --- safety_master_plugin/master_plugin.py | 1 - safety_master_plugin/qt_master_wrapper.py | 22 ++++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/safety_master_plugin/master_plugin.py b/safety_master_plugin/master_plugin.py index cd16379..50f7cf3 100755 --- a/safety_master_plugin/master_plugin.py +++ b/safety_master_plugin/master_plugin.py @@ -77,7 +77,6 @@ class MasterPlugin(Plugin): def handle_master_stop_state_updated(self): """Handles master stop state when it changes e. g. on button click and confirmed.""" - print("woking!!!") if self._master_info.master_stop_state == SS.RUNNING: self.master_stopped() elif self._master_info.master_stop_state == SS.STOPPED: diff --git a/safety_master_plugin/qt_master_wrapper.py b/safety_master_plugin/qt_master_wrapper.py index baaf576..a25aeca 100644 --- a/safety_master_plugin/qt_master_wrapper.py +++ b/safety_master_plugin/qt_master_wrapper.py @@ -100,7 +100,6 @@ class QtWrapper: self.restrictions_updated_callback = callback_function def handle_restrictions_update(self): - print("double?") distance = float(self.widget.distanceSlider.value()) / 100 angular_velocity = float(self.widget.angularSlider.value()) / 100 linear_velocity = float(self.widget.linearSlider.value()) / 100 @@ -124,15 +123,18 @@ class QtWrapper: self.set_sliders_to_initial_values() def handle_master_stop_button_clicked(self): - print("CLick\t") - # self.master_stop_state_updated_callback() - # if self.master_stop_state == SS.RUNNING: - # print("Klikam aby zablokować") - # self.master_stop_state_updated_callback() - # else: - # reply = QMessageBox.warning(self.widget,"UWAGA","Na pewno chcesz odblokować wszystkie roboty?",QMessageBox.Yes,QMessageBox.No) - # if reply == QMessageBox.Yes: - # self.master_stop_state_updated_callback() + if self.master_stop_state == SS.RUNNING: + self.master_stop_state_updated_callback() + else: + reply = QMessageBox.warning( + self.widget, + "UWAGA", + "Na pewno chcesz odblokować wszystkie roboty?", + QMessageBox.Yes, + QMessageBox.No, + ) + if reply == QMessageBox.Yes: + self.master_stop_state_updated_callback() def display_master_stop_on(self): self.widget.masterstopButton.setStyleSheet(