update 增加速度设置,点位比对,启动警报等
This commit is contained in:
@ -107,7 +107,7 @@ class RobotClient(TCPClient):
|
|||||||
def send_emergency_stop(self):
|
def send_emergency_stop(self):
|
||||||
self.sendIOControl(Constant.IO_EmergencyPoint, 0)
|
self.sendIOControl(Constant.IO_EmergencyPoint, 0)
|
||||||
|
|
||||||
def sendIOControl(self, IO_bit, IO_Status: int):
|
def sendIOControl(self, IO_bit, IO_Status: int):#
|
||||||
|
|
||||||
IO_command = CMDInstructRequest()
|
IO_command = CMDInstructRequest()
|
||||||
io_instruction = Instruction()
|
io_instruction = Instruction()
|
||||||
|
|||||||
82
view/Dialog_Reset.ui
Normal file
82
view/Dialog_Reset.ui
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog_reset</class>
|
||||||
|
<widget class="QDialog" name="Dialog_reset">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>308</width>
|
||||||
|
<height>212</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>提示</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: #0D1128;</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QPushButton" name="pushButton_stopFeed">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>60</y>
|
||||||
|
<width>281</width>
|
||||||
|
<height>121</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">*{
|
||||||
|
font: 36pt "Microsoft YaHei UI";
|
||||||
|
background-color: #FF0000;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
*:pressed
|
||||||
|
{
|
||||||
|
background-color: #499c8a;
|
||||||
|
}
|
||||||
|
</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>停止</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="QIcon::ThemeIcon::SystemShutdown"/>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>50</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>261</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: #DBF4F5;
|
||||||
|
font: 700 20pt "Microsoft YaHei UI";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>正在复位......</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
65
view/ui_Dialog_Reset.py
Normal file
65
view/ui_Dialog_Reset.py
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## Form generated from reading UI file 'Dialog_Reset.ui'
|
||||||
|
##
|
||||||
|
## Created by: Qt User Interface Compiler version 6.7.2
|
||||||
|
##
|
||||||
|
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
|
||||||
|
QMetaObject, QObject, QPoint, QRect,
|
||||||
|
QSize, QTime, QUrl, Qt)
|
||||||
|
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||||
|
QFont, QFontDatabase, QGradient, QIcon,
|
||||||
|
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||||
|
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||||
|
from PySide6.QtWidgets import (QApplication, QDialog, QLabel, QPushButton,
|
||||||
|
QSizePolicy, QWidget)
|
||||||
|
|
||||||
|
class Ui_Dialog_reset(object):
|
||||||
|
def setupUi(self, Dialog_reset):
|
||||||
|
if not Dialog_reset.objectName():
|
||||||
|
Dialog_reset.setObjectName(u"Dialog_reset")
|
||||||
|
Dialog_reset.resize(308, 212)
|
||||||
|
Dialog_reset.setStyleSheet(u"background-color: #0D1128;")
|
||||||
|
self.pushButton_stopFeed = QPushButton(Dialog_reset)
|
||||||
|
self.pushButton_stopFeed.setObjectName(u"pushButton_stopFeed")
|
||||||
|
self.pushButton_stopFeed.setGeometry(QRect(10, 60, 281, 121))
|
||||||
|
sizePolicy = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
|
||||||
|
sizePolicy.setHorizontalStretch(0)
|
||||||
|
sizePolicy.setVerticalStretch(0)
|
||||||
|
sizePolicy.setHeightForWidth(self.pushButton_stopFeed.sizePolicy().hasHeightForWidth())
|
||||||
|
self.pushButton_stopFeed.setSizePolicy(sizePolicy)
|
||||||
|
self.pushButton_stopFeed.setStyleSheet(u"*{\n"
|
||||||
|
" font: 36pt \"Microsoft YaHei UI\";\n"
|
||||||
|
"background-color: #FF0000;\n"
|
||||||
|
"border-radius: 10px;\n"
|
||||||
|
"}\n"
|
||||||
|
"*:pressed\n"
|
||||||
|
"{\n"
|
||||||
|
"background-color: #499c8a;\n"
|
||||||
|
"}\n"
|
||||||
|
"")
|
||||||
|
icon = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.SystemShutdown))
|
||||||
|
self.pushButton_stopFeed.setIcon(icon)
|
||||||
|
self.pushButton_stopFeed.setIconSize(QSize(50, 50))
|
||||||
|
self.label = QLabel(Dialog_reset)
|
||||||
|
self.label.setObjectName(u"label")
|
||||||
|
self.label.setGeometry(QRect(20, 10, 261, 31))
|
||||||
|
self.label.setStyleSheet(u"color: #DBF4F5;\n"
|
||||||
|
"font: 700 20pt \"Microsoft YaHei UI\";")
|
||||||
|
self.label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
||||||
|
|
||||||
|
self.retranslateUi(Dialog_reset)
|
||||||
|
|
||||||
|
QMetaObject.connectSlotsByName(Dialog_reset)
|
||||||
|
# setupUi
|
||||||
|
|
||||||
|
def retranslateUi(self, Dialog_reset):
|
||||||
|
Dialog_reset.setWindowTitle(QCoreApplication.translate("Dialog_reset", u"\u63d0\u793a", None))
|
||||||
|
self.pushButton_stopFeed.setText(QCoreApplication.translate("Dialog_reset", u"\u505c\u6b62", None))
|
||||||
|
self.label.setText(QCoreApplication.translate("Dialog_reset", u"\u6b63\u5728\u590d\u4f4d......", None))
|
||||||
|
# retranslateUi
|
||||||
|
|
||||||
Reference in New Issue
Block a user