修改判定脚本
This commit is contained in:
@@ -83,6 +83,7 @@ class updata_dlg(QObject):
|
||||
self.save_but_init()
|
||||
self.cmd_but_init()
|
||||
self.sstate_but_init()
|
||||
self.updatas_but_init()
|
||||
self.com_but_init()
|
||||
self.com_init()
|
||||
self.widget.destroyed.connect(self.quit)
|
||||
@@ -140,6 +141,14 @@ class updata_dlg(QObject):
|
||||
self.sstate_but.setText("MCU在线状态")
|
||||
self.sstate_but.clicked.connect(self.sstate_but_clicked)
|
||||
|
||||
# 初始化升级小板按钮
|
||||
def updatas_but_init(self):
|
||||
self.updatas_but = QPushButton(self.widget)
|
||||
self.updatas_but.setObjectName(u"updatas_but")
|
||||
self.updatas_but.setGeometry(QRect(590, 180, 93, 28))
|
||||
self.updatas_but.setText("升级小板")
|
||||
self.updatas_but.clicked.connect(self.updatas_but_clicked)
|
||||
|
||||
# com口
|
||||
def com_init(self):
|
||||
self.com = QComboBox(self.widget)
|
||||
@@ -289,6 +298,15 @@ class updata_dlg(QObject):
|
||||
def sstate_but_clicked(self):
|
||||
print("sstate_but clicked.")
|
||||
|
||||
def updatas_but_clicked(self):
|
||||
print("updatas_but clicked.")
|
||||
try:
|
||||
self.port.send_str("updatas 1,2,3,4,5,6,7,8,9,10".encode("utf-8"))
|
||||
except Exception as e:
|
||||
print("com not open")
|
||||
print(str(e))
|
||||
|
||||
|
||||
# 开始运行
|
||||
def run(self):
|
||||
self.widget.show()
|
||||
|
Reference in New Issue
Block a user