diff --git a/safety_user_plugin/scripts/qt_wrapper.py b/safety_user_plugin/scripts/qt_wrapper.py index bab0f79..a83cee2 100644 --- a/safety_user_plugin/scripts/qt_wrapper.py +++ b/safety_user_plugin/scripts/qt_wrapper.py @@ -78,12 +78,12 @@ class QtWrapper: return None def display_clutch_on(self): - self.widget.clutchLabel.setPixmap(self.ok_pixmap.scaled(40,40)) + # self.widget.clutchLabel.setPixmap(self.ok_pixmap.scaled(40,40)) self.widget.clutchButton.setStyleSheet("QPushButton { color: black; background-color: green; font: bold 20px}") self.widget.clutchButton.setText('Rozlacz sprzeglo') def display_clutch_off(self): - self.widget.clutchLabel.setPixmap(self.cancel_pixmap.scaled(40,40)) + # self.widget.clutchLabel.setPixmap(self.cancel_pixmap.scaled(40,40)) self.widget.clutchButton.setStyleSheet("QPushButton { color: black; background-color: red; font: bold 20px}") self.widget.clutchButton.setText('Polacz sprzeglo') @@ -196,10 +196,17 @@ class QtWrapper: else: self.display_state_off() + if robot_info.obstacle_detected == True: + self.widget.obstaclestopLabel.setPixmap(self.cancel_pixmap.scaled(40,40)) + else: + self.widget.obstaclestopLabel.setPixmap(self.ok_pixmap.scaled(40,40)) + def master_stopped(self): + self.widget.masterstopLabel.setPixmap(self.cancel_pixmap.scaled(40,40)) self.log_info('Przycisk masterSTOP zostal nacisniety. Zatrzymuje roboty') def master_started(self): + self.widget.masterstopLabel.setPixmap(self.ok_pixmap.scaled(40,40)) self.log_info('Przycisk masterSTOP odcisniety. Mozesz uruchomic robota') def user_stopped(self): @@ -288,7 +295,8 @@ class QtWrapper: self.widget.linearLabel.setText('-') self.widget.angularLabel.setText('-') self.widget.stateLabel.setText('-') - self.widget.clutchLabel.setText('-') + self.widget.masterstopLabel.setText('-') + self.widget.obstaclestopLabel.setText('-') self.widget.choiceButton.setText('Wybierz') diff --git a/safety_user_plugin/ui/user_view.ui b/safety_user_plugin/ui/user_view.ui index 4b62413..a2fa262 100644 --- a/safety_user_plugin/ui/user_view.ui +++ b/safety_user_plugin/ui/user_view.ui @@ -75,7 +75,7 @@ - + QLayout::SetDefaultConstraint @@ -110,21 +110,28 @@ - <html><head/><body><p align="center"><span style=" font-weight:600;">Stan sprzegla</span></p></body></html> + <html><head/><body><p align="center"><span style=" font-weight:600;">Stan robota</span></p></body></html> - <html><head/><body><p align="center"><span style=" font-weight:600;">Stan stopu</span></p></body></html> + <html><head/><body><p align="center"><span style=" font-weight:600;">Stop mastera</span></p></body></html> + + + + + + + <html><head/><body><p align="center"><span style=" font-weight:600;">Stop przeszkody</span></p></body></html> - + @@ -166,7 +173,7 @@ - + <html><head/><body><p align="center">-</p></body></html> @@ -176,7 +183,17 @@ - + + + <html><head/><body><p align="center">-</p></body></html> + + + Qt::AlignCenter + + + + + <html><head/><body><p align="center">-</p></body></html>