update 假人参与
This commit is contained in:
24
app.py
24
app.py
@ -683,6 +683,11 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||||||
else:
|
else:
|
||||||
self.stackedWidget_num.setCurrentIndex(1)
|
self.stackedWidget_num.setCurrentIndex(1)
|
||||||
|
|
||||||
|
if self.feeding.feedConfig.num==2:
|
||||||
|
self.feeding.pause=True
|
||||||
|
self.send_pause_command(True)
|
||||||
|
self.show_messagebox_of_person()
|
||||||
|
log.log_message(logging.ERROR, '人员进入安全区')
|
||||||
self.label_date.setText(datetime.now().strftime("%Y-%m-%d"))
|
self.label_date.setText(datetime.now().strftime("%Y-%m-%d"))
|
||||||
self.label_time.setText(datetime.now().strftime("%H:%M:%S"))
|
self.label_time.setText(datetime.now().strftime("%H:%M:%S"))
|
||||||
|
|
||||||
@ -891,6 +896,25 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||||||
|
|
||||||
self.robotClient.add_sendQuene(request_command)
|
self.robotClient.add_sendQuene(request_command)
|
||||||
|
|
||||||
|
def show_messagebox_of_person(self):
|
||||||
|
# Create a QMessageBox
|
||||||
|
msg_box = QMessageBox(self)
|
||||||
|
msg_box.setWindowTitle("提示")
|
||||||
|
msg_box.setText("当前有人是否继续")
|
||||||
|
msg_box.setIcon(QMessageBox.Question)
|
||||||
|
msg_box.setStandardButtons(QMessageBox.Yes)
|
||||||
|
msg_box.setDefaultButton(QMessageBox.Yes)
|
||||||
|
|
||||||
|
# Execute the dialog and capture the result
|
||||||
|
result = msg_box.exec()
|
||||||
|
|
||||||
|
# Check the result and set the variable accordingly
|
||||||
|
|
||||||
|
if result == QMessageBox.Yes:
|
||||||
|
self.feeding.pause = False
|
||||||
|
self.send_pause_command(False)
|
||||||
|
print(f"Variable value: {self.variable}")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
|
|||||||
Reference in New Issue
Block a user