basically done again
This commit is contained in:
parent
957071075d
commit
b07f221bb6
51
aio.py
51
aio.py
@ -14,7 +14,7 @@ from matplotlib.widgets import Slider
|
||||
matplotlib.use('QtAgg')
|
||||
|
||||
from PySide6.QtCore import Qt, QThread, Signal, QObject, QTimer
|
||||
from PySide6.QtGui import QTextCursor, QFont, QPixmap, QColor, QBrush
|
||||
from PySide6.QtGui import QTextCursor, QFont, QPixmap, QColor, QBrush, QIcon
|
||||
from PySide6.QtWidgets import QMessageBox, QCheckBox, QSplashScreen, QApplication, QFrame, QLabel, QTreeWidgetItem, QFileDialog, QHeaderView, QDialog, QVBoxLayout, QPlainTextEdit
|
||||
|
||||
import codes.common.clibs as clibs
|
||||
@ -25,12 +25,6 @@ from codes.autotest import do_current, do_brake
|
||||
from codes.durable import factory_test
|
||||
|
||||
|
||||
class MultiWindows:
|
||||
login_window = None
|
||||
reset_window = None
|
||||
main_window = None
|
||||
|
||||
|
||||
class ContentDialog(QDialog):
|
||||
def __init__(self, content, parent=None):
|
||||
super().__init__(parent)
|
||||
@ -111,6 +105,7 @@ class MainWindow(main_window.Ui_MainWindow):
|
||||
header.setSectionResizeMode(i, QHeaderView.ResizeMode.ResizeToContents)
|
||||
# ========================= clibs =========================
|
||||
self.setup_statusbar()
|
||||
self.setWindowIcon(QIcon(f"{clibs.PREFIX}/media/icon.ico"))
|
||||
# ========================= styleSheet =========================
|
||||
tws = [self.tw_funcs, self.tw_docs]
|
||||
for tw in tws:
|
||||
@ -199,6 +194,7 @@ class MainWindow(main_window.Ui_MainWindow):
|
||||
QMessageBox.warning(self, "停止运行", "运行过程中不建议停止运行,可能会损坏文件,如果确实需要停止运行,可以直接关闭窗口!")
|
||||
|
||||
def prog_reset(self):
|
||||
self.tw_docs.setCurrentIndex(0)
|
||||
self.pte_output.clear()
|
||||
|
||||
def file_browser(self):
|
||||
@ -296,6 +292,7 @@ class MainWindow(main_window.Ui_MainWindow):
|
||||
item = QTreeWidgetItem(self.treew_log)
|
||||
for i in range(self.treew_log.columnCount()):
|
||||
item.setText(i, str(record[i]))
|
||||
item.setTextAlignment(i, Qt.AlignmentFlag.AlignLeft | Qt.AlignmentFlag.AlignVCenter)
|
||||
self.treew_log.addTopLevelItem(item)
|
||||
color_map = {"DEBUG": QColor(220, 220, 220), "INFO": QColor(144, 238, 144), "WARNING": QColor(255, 240, 210), "ERROR": QColor(255, 220, 220)}
|
||||
brush = QBrush(color_map[record[2].upper()])
|
||||
@ -319,11 +316,11 @@ class MainWindow(main_window.Ui_MainWindow):
|
||||
@clibs.db_lock
|
||||
def do_pre():
|
||||
if self.is_searching is False:
|
||||
first_id = self.treew_log.topLevelItem(0).text(0)
|
||||
end = int(first_id)-1 if int(first_id)-1 > 0 else None
|
||||
start = int(first_id)-100 if int(first_id)-100 > 0 else 0
|
||||
first_id = int(self.treew_log.topLevelItem(0).text(0))
|
||||
end = first_id-1 if first_id-1 > 0 else None
|
||||
if end is None:
|
||||
return
|
||||
start = end-100 if end-100 > 0 else 1
|
||||
|
||||
clibs.cursor.execute(f"SELECT * FROM logs WHERE id BETWEEN {start} AND {end}")
|
||||
records = clibs.cursor.fetchall()
|
||||
@ -400,7 +397,7 @@ class MainWindow(main_window.Ui_MainWindow):
|
||||
line_number = self.treew_log.topLevelItemCount()
|
||||
last_id = int(self.treew_log.topLevelItem(line_number-1).text(0))
|
||||
start = last_id + 1 if last_id % 100 == 0 else last_id - last_id % 100 + 1
|
||||
end = int(last_id) + 100
|
||||
end = int(start) + 100
|
||||
if int(start) <= len_records:
|
||||
clibs.cursor.execute(f"select * from logs where id between {start} and {end}")
|
||||
records = clibs.cursor.fetchall()
|
||||
@ -677,7 +674,7 @@ class MainWindow(main_window.Ui_MainWindow):
|
||||
clibs.search_records = clibs.cursor.fetchall()
|
||||
len_records = len(clibs.search_records)
|
||||
pages_all = len_records // 100 if len_records % 100 == 0 else len_records // 100 + 1
|
||||
remainder = len_records % 100
|
||||
remainder = len_records % 100 if len_records % 100 != 0 else 100
|
||||
records = clibs.search_records[-1 * remainder:]
|
||||
|
||||
return pages_all, records
|
||||
@ -739,7 +736,7 @@ class MainWindow(main_window.Ui_MainWindow):
|
||||
|
||||
def md_conn(self):
|
||||
if clibs.status["hmi"] == 0:
|
||||
QMessageBox.warning(self, "告警", "操作Modbus连接之前,需要先打开HMI连接!")
|
||||
QMessageBox.warning(self, "告警", "操作 Modbus 连接之前,需要先打开 HMI 连接!")
|
||||
return
|
||||
|
||||
self.btn_md_conn.setDisabled(True)
|
||||
@ -751,7 +748,7 @@ class MainWindow(main_window.Ui_MainWindow):
|
||||
|
||||
def ec_conn(self):
|
||||
if clibs.status["hmi"] == 0:
|
||||
QMessageBox.warning(self, "告警", "操作外部通信连接之前,需要先打开HMI连接!")
|
||||
QMessageBox.warning(self, "告警", "操作 EC 连接之前,需要先打开 HMI 连接!")
|
||||
return
|
||||
|
||||
self.btn_ec_conn.setDisabled(True)
|
||||
@ -792,7 +789,7 @@ class MainWindow(main_window.Ui_MainWindow):
|
||||
clibs.c_hr.logger("DEBUG", "aio", f"hmi: xService请求发送成功 {cmd_json}")
|
||||
|
||||
if clibs.status["hmi"] == 0:
|
||||
QMessageBox.critical(self, "错误", "使用该功能之前,需要先打开HMI连接!")
|
||||
QMessageBox.critical(self, "错误", "使用该功能之前,需要先打开 HMI 连接!")
|
||||
return
|
||||
if self.pte_hmi_send.toPlainText() == "":
|
||||
return
|
||||
@ -847,7 +844,7 @@ class MainWindow(main_window.Ui_MainWindow):
|
||||
|
||||
def ec_send(self):
|
||||
if clibs.status["ec"] == 0:
|
||||
QMessageBox.critical(self, "错误", "使用该功能之前,需要先打开MD连接!")
|
||||
QMessageBox.critical(self, "错误", "使用该功能之前,需要先打开 EC 连接!")
|
||||
return
|
||||
if self.pte_ec_send.toPlainText() == "":
|
||||
return
|
||||
@ -866,7 +863,7 @@ class MainWindow(main_window.Ui_MainWindow):
|
||||
cmd = self.cb_hmi_cmd.currentText()
|
||||
self.pte_hmi_send.clear()
|
||||
self.pte_him_recv.clear()
|
||||
with open(f"assets/files/protocols/hmi/{cmd}.json", mode="r", encoding="utf-8") as f_hmi:
|
||||
with open(f"{clibs.PREFIX}/files/protocols/hmi/{cmd}.json", mode="r", encoding="utf-8") as f_hmi:
|
||||
hmi_dict = json.load(f_hmi)
|
||||
t = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S.%f")
|
||||
hmi_dict["id"] = "@".join([cmd, t])
|
||||
@ -877,7 +874,7 @@ class MainWindow(main_window.Ui_MainWindow):
|
||||
self.pte_md_send.clear()
|
||||
self.pte_md_recv.clear()
|
||||
self.pte_md_send.appendPlainText(cmd)
|
||||
with open(f"assets/files/protocols/md/{cmd}.txt", mode="r", encoding="utf-8") as f_md:
|
||||
with open(f"{clibs.PREFIX}/files/protocols/md/{cmd}.txt", mode="r", encoding="utf-8") as f_md:
|
||||
c_send = f_md.read()
|
||||
self.pte_md_send.appendPlainText(c_send)
|
||||
|
||||
@ -885,16 +882,16 @@ class MainWindow(main_window.Ui_MainWindow):
|
||||
cmd = self.cb_ec_cmd.currentText()
|
||||
self.pte_ec_send.clear()
|
||||
self.pte_ec_recv.clear()
|
||||
with open(f"assets/files/protocols/ec/{cmd}.txt", mode="r", encoding="utf-8") as f_md:
|
||||
with open(f"{clibs.PREFIX}/files/protocols/ec/{cmd}.txt", mode="r", encoding="utf-8") as f_md:
|
||||
c_send = f_md.read()
|
||||
self.pte_ec_send.appendPlainText(c_send)
|
||||
|
||||
def check_interval(self):
|
||||
try:
|
||||
interval = float(self.le_durable_interval.text())
|
||||
interval = 300 if interval < 300 else int(interval)
|
||||
interval = clibs.CYCLE if interval < clibs.CYCLE else int(interval)
|
||||
except Exception:
|
||||
interval = 300
|
||||
interval = clibs.CYCLE
|
||||
self.le_durable_interval.setText(str(interval))
|
||||
|
||||
def state_detection(self):
|
||||
@ -934,11 +931,11 @@ class MainWindow(main_window.Ui_MainWindow):
|
||||
event.ignore()
|
||||
|
||||
def setup_statusbar(self):
|
||||
with open(f"assets/files/version/local_vers", mode="r", encoding="utf-8") as f_local:
|
||||
with open(f"{clibs.PREFIX}/files/version/local_vers", mode="r", encoding="utf-8") as f_local:
|
||||
local_vers = f_local.read().strip()
|
||||
l_version, update = local_vers.split("@")
|
||||
vers_info = f" v{l_version} Update@{update}"
|
||||
with open(f"assets/files/version/server_vers", mode="r", encoding="utf-8") as f_server:
|
||||
with open(f"{clibs.PREFIX}/files/version/server_vers", mode="r", encoding="utf-8") as f_server:
|
||||
server_vers = f_server.read().strip()
|
||||
|
||||
update_label = QLabel()
|
||||
@ -946,11 +943,11 @@ class MainWindow(main_window.Ui_MainWindow):
|
||||
self.statusbar.addWidget(version_label, 0)
|
||||
self.statusbar.addPermanentWidget(update_label, 0) # 添加到右侧
|
||||
if local_vers == server_vers:
|
||||
update_label.setText('<img src="assets/media/updated.png" width="12" height="12" /><font color="#0D8A3D" face="consolas" size="4"><b> 当前是最新版本,继续保持! </b></font>')
|
||||
update_label.setText(f'<img src="{clibs.PREFIX}/media/updated.png" width="12" height="12" /><font color="#0D8A3D" face="consolas" size="4"><b> 当前是最新版本,继续保持! </b></font>')
|
||||
elif local_vers > server_vers:
|
||||
pass
|
||||
elif local_vers < server_vers:
|
||||
update_label.setText(f'''<a href="https://www.rustle.cc/aio.zip" style="text-decoration: none;"><img src="assets/media/upgrade.png" width="12" height="12" /><font color="#D81E06" face="consolas" size="4"><b> v{server_vers.split('@')[0]}已经发布,尽快更新至最新版本! </b></font></a>''')
|
||||
update_label.setText(f'''<a href="https://www.rustle.cc/aio.zip" style="text-decoration: none;"><img src="{clibs.PREFIX}/media/upgrade.png" width="12" height="12" /><font color="#D81E06" face="consolas" size="4"><b> v{server_vers.split('@')[0]}已经发布,尽快更新至最新版本! </b></font></a>''')
|
||||
|
||||
version_label.setText(f'<font color="black" face="consolas" size="4"><b> {vers_info}</b></font>')
|
||||
update_label.setOpenExternalLinks(True) # 允许超链接在浏览器中打开
|
||||
@ -971,7 +968,7 @@ class InitWork(QThread):
|
||||
req = request.Request(url_vers, headers=headers)
|
||||
response = request.urlopen(req, timeout=clibs.INTERVAL * 10)
|
||||
server_vers = response.read().decode("utf-8").strip()
|
||||
with open("assets/files/version/server_vers", mode="w", encoding="utf-8") as f_server:
|
||||
with open(f"{clibs.PREFIX}/files/version/server_vers", mode="w", encoding="utf-8") as f_server:
|
||||
f_server.write(server_vers)
|
||||
self.completed.emit("true")
|
||||
except Exception as err:
|
||||
@ -988,7 +985,7 @@ class SplashScreen(QApplication):
|
||||
super().__init__(argv)
|
||||
self.window = None
|
||||
|
||||
pixmap = QPixmap("./assets/media/splash.png")
|
||||
pixmap = QPixmap(f"{clibs.PREFIX}/media/splash.png")
|
||||
self.splash = QSplashScreen(pixmap, Qt.WindowType.WindowStaysOnTopHint)
|
||||
scaled_pixmap = pixmap.scaled(800, 400, Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.SmoothTransformation)
|
||||
self.splash.setPixmap(scaled_pixmap)
|
||||
|
@ -1,842 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<m>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40000"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40000"/>
|
||||
<c name="function" type="10" value="ctrl_clear_alarm"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_clear_alarm"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40001"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40001"/>
|
||||
<c name="function" type="10" value="ctrl_estop_reset"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_estop_reset"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40002"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40002"/>
|
||||
<c name="function" type="10" value="ctrl_estop_reset_clear_alarm"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_onekey_reset"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40003"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40003"/>
|
||||
<c name="function" type="10" value="ctrl_motor_off"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_motor_off"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40004"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40004"/>
|
||||
<c name="function" type="10" value="ctrl_motor_on"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_motor_on"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40005"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40005"/>
|
||||
<c name="function" type="10" value="ctrl_motoron_pptomain_start"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_onekey_start"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40006"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40006"/>
|
||||
<c name="function" type="10" value="ctrl_motoron_start"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_motoron_start"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40007"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40007"/>
|
||||
<c name="function" type="10" value="ctrl_pause_motoroff"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_pause_motoroff"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40008"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40008"/>
|
||||
<c name="function" type="10" value="ctrl_pptomain"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_pp2main"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40009"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40009"/>
|
||||
<c name="function" type="10" value="ctrl_program_start"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_prog_start"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40010"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40010"/>
|
||||
<c name="function" type="10" value="ctrl_program_stop"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_prog_stop"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40011"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40011"/>
|
||||
<c name="function" type="10" value="ctrl_reduced_mode"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_reduced_mode"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40012"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40012"/>
|
||||
<c name="function" type="10" value="ctrl_soft_estop"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_soft_estop"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="true"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40013"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40013"/>
|
||||
<c name="function" type="10" value="ctrl_switch_auto_motoron"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_auto_motoron"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40014"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40014"/>
|
||||
<c name="function" type="10" value="ctrl_switch_operation_auto"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_switch_auto"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40015"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40015"/>
|
||||
<c name="function" type="10" value="ctrl_switch_operation_manu"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_switch_manual"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40016"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40016"/>
|
||||
<c name="function" type="10" value="enable_safe_region01"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_safe_region01"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40017"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40017"/>
|
||||
<c name="function" type="10" value="enable_safe_region02"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_safe_region02"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40018"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40018"/>
|
||||
<c name="function" type="10" value="enable_safe_region03"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="r_safe_region03"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40100"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40100"/>
|
||||
<c name="function" type="10" value=""/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="act"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rd"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40500"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40500"/>
|
||||
<c name="function" type="10" value="sta_alarm"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_alarm_state"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="true"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40501"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40501"/>
|
||||
<c name="function" type="10" value="sta_collision"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_clsn_alarm_stat"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40502"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40502"/>
|
||||
<c name="function" type="10" value="sta_collision_open"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_clsn_open_stat"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="true"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40503"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40503"/>
|
||||
<c name="function" type="10" value="sta_controller_is_running"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_controller_running"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="true"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40504"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40504"/>
|
||||
<c name="function" type="10" value="sta_encoder_low_battery"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_encoder_low"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40505"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40505"/>
|
||||
<c name="function" type="10" value="sta_estop"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_estop_stat"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40506"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40506"/>
|
||||
<c name="function" type="10" value="sta_motor"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_motor_stat"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40507"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40507"/>
|
||||
<c name="function" type="10" value="sta_operation_mode"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_operation_mode"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40508"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40508"/>
|
||||
<c name="function" type="10" value="sta_program"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_prog_stat"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40509"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40509"/>
|
||||
<c name="function" type="10" value="sta_program_not_run"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_prog_not_run"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="true"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40510"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40510"/>
|
||||
<c name="function" type="10" value="sta_program_reset"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_prog_reset"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40511"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40511"/>
|
||||
<c name="function" type="10" value="sta_reduced_mode"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_reduced_mode_stat"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40512"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40512"/>
|
||||
<c name="function" type="10" value="sta_robot_is_busy"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_robot_is_busy"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40513"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40513"/>
|
||||
<c name="function" type="10" value="sta_robot_moving"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_robot_moving"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40514"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40514"/>
|
||||
<c name="function" type="10" value="sta_safe_door"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_safe_door"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40515"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40515"/>
|
||||
<c name="function" type="10" value="sta_safe_region01"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_safe_region01"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40516"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40516"/>
|
||||
<c name="function" type="10" value="sta_safe_region02"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_safe_region02"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40517"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40517"/>
|
||||
<c name="function" type="10" value="sta_safe_region03"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_safe_region03"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40518"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40518"/>
|
||||
<c name="function" type="10" value="sta_soft_estop"/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="w_soft_estop_stat"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40600"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40600"/>
|
||||
<c name="function" type="10" value=""/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="ready_to_go"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40601"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40602"/>
|
||||
<c name="function" type="10" value=""/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="scenario_time"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="float"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="0"/>
|
||||
<c name="bias" type="2" value="0"/>
|
||||
</l>
|
||||
<l>
|
||||
<c name="addr" type="2" value="40603"/>
|
||||
<c name="addr_1st" type="2" value="0"/>
|
||||
<c name="addr_2nd" type="2" value="0"/>
|
||||
<c name="bit_bias" type="2" value="0"/>
|
||||
<c name="byte_bias" type="4" value="0"/>
|
||||
<c name="description" type="10" value=""/>
|
||||
<c name="dev_name" type="10" value="autotest"/>
|
||||
<c name="dev_type" type="10" value="MODBUS"/>
|
||||
<c name="end_addr" type="2" value="40603"/>
|
||||
<c name="function" type="10" value=""/>
|
||||
<c name="len" type="2" value="1"/>
|
||||
<c name="name" type="10" value="capture_start"/>
|
||||
<c name="retain" type="1" value="false"/>
|
||||
<c name="rw" type="10" value="rdwr"/>
|
||||
<c name="type" type="10" value="bool"/>
|
||||
<c name="value"/>
|
||||
<c name="value_single" type="10" value="false"/>
|
||||
</l>
|
||||
</m>
|
Binary file not shown.
1
assets/files/protocols/ec/io_state.txt
Normal file
1
assets/files/protocols/ec/io_state.txt
Normal file
@ -0,0 +1 @@
|
||||
io_state:DO4_0,DI4_1
|
@ -1 +0,0 @@
|
||||
set_do:DO4_0,true
|
1
assets/files/protocols/ec/setdo.txt
Normal file
1
assets/files/protocols/ec/setdo.txt
Normal file
@ -0,0 +1 @@
|
||||
setdo:DO4_0,true
|
@ -6,8 +6,8 @@ VSVersionInfo(
|
||||
ffi=FixedFileInfo(
|
||||
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
|
||||
# Set not needed items to zero 0.
|
||||
filevers=(0, 3, 1, 6),
|
||||
prodvers=(0, 3, 1, 6),
|
||||
filevers=(0, 4, 0, 0),
|
||||
prodvers=(0, 4, 0, 0),
|
||||
# Contains a bitmask that specifies the valid bits 'flags'r
|
||||
mask=0x3f,
|
||||
# Contains a bitmask that specifies the Boolean attributes of the file.
|
||||
@ -31,12 +31,12 @@ VSVersionInfo(
|
||||
'040904b0',
|
||||
[StringStruct('CompanyName', 'Rokae - https://www.rokae.com/'),
|
||||
StringStruct('FileDescription', 'All in one automatic toolbox'),
|
||||
StringStruct('FileVersion', '0.3.1.6 (2025-03-21)'),
|
||||
StringStruct('FileVersion', '0.4.0.0 (2025-03-28)'),
|
||||
StringStruct('InternalName', 'AIO.exe'),
|
||||
StringStruct('LegalCopyright', '© 2024-2025 Manford Fan'),
|
||||
StringStruct('OriginalFilename', 'AIO.exe'),
|
||||
StringStruct('ProductName', 'AIO'),
|
||||
StringStruct('ProductVersion', '0.3.1.6 (2025-03-21)')])
|
||||
StringStruct('ProductVersion', '0.4.0.0 (2025-03-28)')])
|
||||
]),
|
||||
VarFileInfo([VarStruct('Translation', [1033, 1200])])
|
||||
]
|
||||
|
@ -1 +1 @@
|
||||
0.3.1.6@03/21/2025
|
||||
0.4.0.0@03/27/2025
|
@ -1 +1 @@
|
||||
0.3.1.7@03/24/2025
|
||||
0.4.0.0@03/27/2025
|
@ -159,13 +159,12 @@ class DoBrakeTest(QThread):
|
||||
prj_name = ".".join(prj_file.split("/")[-1].split(".")[:-1])
|
||||
wb = openpyxl.load_workbook(config_file, read_only=True)
|
||||
ws = wb["Target"]
|
||||
write_diagnosis = float(ws.cell(row=2, column=2).value)
|
||||
get_init_speed = float(ws.cell(row=3, column=2).value)
|
||||
single_brake = str(ws.cell(row=4, column=2).value)
|
||||
pon = ws.cell(row=5, column=2).value
|
||||
io_name = ws.cell(row=6, column=2).value.upper().strip()
|
||||
get_init_speed = float(ws.cell(row=2, column=2).value)
|
||||
single_brake = str(ws.cell(row=3, column=2).value).strip()
|
||||
pon = ws.cell(row=4, column=2).value
|
||||
io_name = ws.cell(row=5, column=2).value.upper().strip()
|
||||
wb.close()
|
||||
msg = f"基本参数配置:write_diagnosis(废弃) = {write_diagnosis}, get_init_speed = {get_init_speed}, single_brake = {single_brake}, pon = {pon}"
|
||||
msg = f"基本参数配置:get_init_speed = {get_init_speed}, single_brake = {single_brake}, pon = {pon}, IO = {io_name}"
|
||||
self.logger("INFO", "do_brake", msg)
|
||||
|
||||
if pon == "positive":
|
||||
@ -195,7 +194,7 @@ class DoBrakeTest(QThread):
|
||||
continue
|
||||
|
||||
clibs.c_md.write_axis(axis)
|
||||
self.logger("INFO", "brake-processing", "-" * 90, "purple", flag="signal")
|
||||
self.logger("INFO", "brake", "-" * 90, "purple", flag="signal")
|
||||
speed_max = 0
|
||||
for rounds in range(1, 4):
|
||||
count += 1
|
||||
@ -309,9 +308,9 @@ class DoBrakeTest(QThread):
|
||||
if clibs.c_md.w_program_state == 1:
|
||||
break
|
||||
else:
|
||||
time.sleep(5)
|
||||
time.sleep(2)
|
||||
if time.time() - t_start > 60:
|
||||
self.logger("ERROR", "do_brake","60s 内程序未能正常执行,需检查...", "red", "RlProgramStartTimeout")
|
||||
self.logger("ERROR", "do_brake", "60s 内程序未能正常执行,需检查...", "red", "RlProgramStartTimeout")
|
||||
|
||||
for i in range(16):
|
||||
if clibs.c_md.read_ready_to_go() == 1:
|
||||
@ -360,7 +359,7 @@ class DoBrakeTest(QThread):
|
||||
break
|
||||
|
||||
else:
|
||||
time.sleep(50) # why?
|
||||
time.sleep(clibs.INTERVAL*2)
|
||||
self.change_curve_state(False)
|
||||
msg = f"<br>{self.tool.removeprefix('tool')}%负载的制动性能测试执行完毕,如需采集其他负载,须切换负载类型,并更换其他负载,重新执行"
|
||||
self.logger("INFO", "do_brake", msg, "green")
|
||||
|
@ -81,23 +81,18 @@ def handle_exception(func):
|
||||
return wrapper
|
||||
|
||||
|
||||
log_path = f"assets/logs"
|
||||
PREFIX = "resources/assets" # for pyinstaller
|
||||
# PREFIX = "assets" # for local testing
|
||||
log_path = f"{PREFIX}/logs"
|
||||
lock = threading.Lock()
|
||||
running = [0, 0, 0, 0, 0, 0, 0] # 制动数据/转矩数据/激光数据/精度数据/制动自动化/转矩自动化/耐久数据采集
|
||||
functions = ["制动数据处理", "转矩数据处理", "激光数据处理", "精度数据处理", "制动自动化测试", "转矩自动化测试", "耐久数据采集"]
|
||||
levels = ["DEBUG", "INFO", "WARNING", "ERROR"]
|
||||
ip_addr, ssh_port, socket_port, xService_port, external_port, modbus_port, upgrade_port = "", 22, 5050, 6666, 8080, 502, 4567
|
||||
username, password = "luoshi", "luoshi2019"
|
||||
INTERVAL, RADIAN, MAX_FRAME_SIZE, MAX_LOG_NUMBER = 1, 57.3, 1024, 10
|
||||
INTERVAL, RADIAN, MAX_FRAME_SIZE, MAX_LOG_NUMBER, CYCLE = 1, 57.3, 1024, 10, 300
|
||||
c_md, c_hr, c_ec, c_pd, conn, cursor, search_records = None, None, None, None, None, None, None
|
||||
status = {"mysql": 0, "hmi": 0, "md": 0, "ec": 0}
|
||||
c_joint_vel, c_servo_trq, c_sensor_trq, c_estimate_trans_trq, c_safety_estop = 1, 2, 3, 4, 3 # 各个指标所在列
|
||||
|
||||
init_logdb()
|
||||
|
||||
# ============== ↓↓↓DEBUG CODE↓↓↓ ==============
|
||||
for i in range(100):
|
||||
logger("DEBUG", "clibs", 'running123', flag="cursor")
|
||||
logger("INFO", "aio", 'running234', flag="cursor")
|
||||
logger("WARNING", "openapi", 'running345', flag="cursor")
|
||||
logger("ERROR", "brake", 'running456', flag="cursor")
|
||||
|
@ -745,7 +745,7 @@ class HmiRequest(QThread):
|
||||
def execution(self, command, **kwargs):
|
||||
req = None
|
||||
try:
|
||||
with open(f"assets/files/protocols/hmi/{command}.json", encoding="utf-8", mode="r") as f_json:
|
||||
with open(f"{clibs.PREFIX}/files/protocols/hmi/{command}.json", encoding="utf-8", mode="r") as f_json:
|
||||
req = json.load(f_json)
|
||||
t = datetime.now().strftime("%Y-%m-%dT%H:%M:%S.%f")
|
||||
req["id"] = f"{command}@{t}"
|
||||
@ -768,12 +768,14 @@ class HmiRequest(QThread):
|
||||
cmd = json.dumps(req, separators=(",", ":"))
|
||||
try:
|
||||
self.c.send(self.package(cmd))
|
||||
time.sleep(clibs.INTERVAL/4)
|
||||
self.logger("DEBUG", "openapi", f"hmi: 老协议请求发送成功 {cmd}")
|
||||
except Exception as err:
|
||||
self.logger("ERROR", "openapi", f"hmi: 老协议请求发送失败 {cmd},报错信息 {err}", "red", "CommandSendFailed")
|
||||
elif flag == 1:
|
||||
try:
|
||||
self.c_xs.send(self.package_xs(req))
|
||||
time.sleep(clibs.INTERVAL/4)
|
||||
self.logger("DEBUG", "openapi", f"hmi: xService请求发送成功 {req}")
|
||||
except Exception as Err:
|
||||
self.logger("ERROR", "openapi", f"hr: xService请求发送失败 {req} 报错信息 {Err}", "red", "CommandSendFailed")
|
||||
@ -1804,9 +1806,9 @@ class ExternalCommunication(QThread):
|
||||
if clibs.status["ec"]:
|
||||
try:
|
||||
self.c.close()
|
||||
self.logger("INFO", "openapi", f"ec: 关闭 EC 连接成功", "green")
|
||||
self.logger("INFO", "openapi", f"ec: 关闭外部通信连接成功", "green")
|
||||
except Exception as err:
|
||||
self.logger("ERROR", "openapi", f"ec: 关闭 EC 连接失败:{err}", "red", "EcCloseFailed")
|
||||
self.logger("ERROR", "openapi", f"ec: 关闭外部通信连接失败:{err}", "red", "EcCloseFailed")
|
||||
|
||||
def s_string(self, directive):
|
||||
order = "".join([directive, self.suffix])
|
||||
@ -2057,7 +2059,7 @@ class ExternalCommunication(QThread):
|
||||
self.s_string(directive)
|
||||
time.sleep(clibs.INTERVAL)
|
||||
result = self.r_string(directive).strip()
|
||||
self.logger("INFO", "openapi", f"ec: 执行{description}指令是 {directive},返回值为 {result}{more_desc}")
|
||||
self.logger("DEBUG", "openapi", f"ec: 执行{description}指令是 {directive},返回值为 {result}{more_desc}")
|
||||
return result
|
||||
|
||||
|
||||
@ -2167,9 +2169,9 @@ class RobotInit(object):
|
||||
interactive_data = f"/home/luoshi/bin/controller/interactive_data/{robot_type}"
|
||||
|
||||
config_files = [
|
||||
f"assets/files/projects/fieldbus_device.json",
|
||||
f"assets/files/projects/registers.json",
|
||||
f"assets/files/projects/registers.xml"
|
||||
f"{clibs.PREFIX}/files/projects/fieldbus_device.json",
|
||||
f"{clibs.PREFIX}/files/projects/registers.json",
|
||||
f"{clibs.PREFIX}/files/projects/registers.xml"
|
||||
]
|
||||
for config_file in config_files:
|
||||
filename = config_file.split("/")[-1]
|
||||
@ -2197,10 +2199,10 @@ class RobotInit(object):
|
||||
os.remove(io_device_file_local_tmp)
|
||||
except:
|
||||
...
|
||||
clibs.c_hr.execution("io_device.load_cfg")
|
||||
clibs.c_hr.execution("modbus.load_cfg")
|
||||
clibs.c_hr.execution("fieldbus_device.load_cfg")
|
||||
clibs.c_hr.execution("fieldbus_device.set_params", device_name="autotest", enable=True)
|
||||
clibs.c_hr.execution("io_device.load_cfg")
|
||||
clibs.c_hr.execution("modbus.load_cfg")
|
||||
|
||||
def robot_init(self):
|
||||
pd = PreDos(clibs.ip_addr, clibs.ssh_port, clibs.username, clibs.password)
|
||||
|
@ -19,7 +19,7 @@ class DoFactoryTest(QThread):
|
||||
def __init__(self, dir_path, interval, procs, /):
|
||||
super().__init__()
|
||||
self.dir_path = dir_path
|
||||
self.interval = int(interval) if interval != "" else 300
|
||||
self.interval = int(interval) if interval != "" else clibs.CYCLE
|
||||
self.procs = procs
|
||||
self.idx = 6
|
||||
self.curves = []
|
||||
@ -99,6 +99,7 @@ class DoFactoryTest(QThread):
|
||||
self.change_curve_state(False)
|
||||
clibs.c_md.r_soft_estop(0)
|
||||
clibs.c_md.r_soft_estop(1)
|
||||
clibs.c_md.r_reset_estop()
|
||||
clibs.c_md.r_clear_alarm()
|
||||
clibs.c_md.write_act(False)
|
||||
time.sleep(1) # 让曲线彻底关闭
|
||||
|
@ -38,9 +38,6 @@ class Ui_MainWindow(QMainWindow):
|
||||
font.setFamilies([u"Consolas"])
|
||||
font.setPointSize(14)
|
||||
MainWindow.setFont(font)
|
||||
icon = QIcon()
|
||||
icon.addFile(u"../assets/media/icon.ico", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
|
||||
MainWindow.setWindowIcon(icon)
|
||||
MainWindow.setStyleSheet(u"background-color: rgb(233, 233, 233);")
|
||||
MainWindow.setDocumentMode(False)
|
||||
self.centralwidget = QWidget(MainWindow)
|
||||
@ -290,7 +287,7 @@ class Ui_MainWindow(QMainWindow):
|
||||
self.sa_durable.setWidgetResizable(True)
|
||||
self.scrollAreaWidgetContents = QWidget()
|
||||
self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents")
|
||||
self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 212, 78))
|
||||
self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 158, 78))
|
||||
self.horizontalLayout_9 = QHBoxLayout(self.scrollAreaWidgetContents)
|
||||
self.horizontalLayout_9.setObjectName(u"horizontalLayout_9")
|
||||
self.verticalLayout_5 = QVBoxLayout()
|
||||
@ -652,6 +649,7 @@ class Ui_MainWindow(QMainWindow):
|
||||
self.cb_ec_cmd.addItem("")
|
||||
self.cb_ec_cmd.addItem("")
|
||||
self.cb_ec_cmd.addItem("")
|
||||
self.cb_ec_cmd.addItem("")
|
||||
self.cb_ec_cmd.setObjectName(u"cb_ec_cmd")
|
||||
self.cb_ec_cmd.setMinimumSize(QSize(240, 0))
|
||||
self.cb_ec_cmd.setFont(font4)
|
||||
@ -881,7 +879,7 @@ class Ui_MainWindow(QMainWindow):
|
||||
self.label.setText(QCoreApplication.translate("MainWindow", u"Rokae AIO", None))
|
||||
self.btn_start.setText(QCoreApplication.translate("MainWindow", u"\u5f00\u59cb\u6267\u884c", None))
|
||||
self.btn_stop.setText(QCoreApplication.translate("MainWindow", u"\u505c\u6b62\u6267\u884c", None))
|
||||
self.btn_reset.setText(QCoreApplication.translate("MainWindow", u"\u72b6\u6001\u91cd\u7f6e", None))
|
||||
self.btn_reset.setText(QCoreApplication.translate("MainWindow", u"\u8f93\u51fa\u91cd\u7f6e", None))
|
||||
self.cb_data_func.setItemText(0, QCoreApplication.translate("MainWindow", u"\u5236\u52a8", None))
|
||||
self.cb_data_func.setItemText(1, QCoreApplication.translate("MainWindow", u"\u8f6c\u77e9", None))
|
||||
self.cb_data_func.setItemText(2, QCoreApplication.translate("MainWindow", u"\u6fc0\u5149", None))
|
||||
@ -951,12 +949,13 @@ class Ui_MainWindow(QMainWindow):
|
||||
self.label_18.setText("")
|
||||
self.cb_ec_cmd.setItemText(0, QCoreApplication.translate("MainWindow", u"motor_on", None))
|
||||
self.cb_ec_cmd.setItemText(1, QCoreApplication.translate("MainWindow", u"motor_off", None))
|
||||
self.cb_ec_cmd.setItemText(2, QCoreApplication.translate("MainWindow", u"set_do", None))
|
||||
self.cb_ec_cmd.setItemText(2, QCoreApplication.translate("MainWindow", u"setdo", None))
|
||||
self.cb_ec_cmd.setItemText(3, QCoreApplication.translate("MainWindow", u"switch_mode_auto", None))
|
||||
self.cb_ec_cmd.setItemText(4, QCoreApplication.translate("MainWindow", u"switch_mode_manual", None))
|
||||
self.cb_ec_cmd.setItemText(5, QCoreApplication.translate("MainWindow", u"operating_mode", None))
|
||||
self.cb_ec_cmd.setItemText(6, QCoreApplication.translate("MainWindow", u"motor_on_state", None))
|
||||
self.cb_ec_cmd.setItemText(7, QCoreApplication.translate("MainWindow", u"robot_running_state", None))
|
||||
self.cb_ec_cmd.setItemText(6, QCoreApplication.translate("MainWindow", u"io_state", None))
|
||||
self.cb_ec_cmd.setItemText(7, QCoreApplication.translate("MainWindow", u"motor_on_state", None))
|
||||
self.cb_ec_cmd.setItemText(8, QCoreApplication.translate("MainWindow", u"robot_running_state", None))
|
||||
|
||||
self.btn_ec_send.setText(QCoreApplication.translate("MainWindow", u"\u53d1\u9001", None))
|
||||
self.pushButton.setText(QCoreApplication.translate("MainWindow", u"HMI", None))
|
||||
|
@ -103,7 +103,7 @@
|
||||
打包时,只需要修改 clibs.py 中的 PREFIX 即可,调试时再修改回来,第三方库依赖详见 `assets/files/version/requirements.txt` 文件
|
||||
|
||||
```
|
||||
pyinstaller --noconfirm --onedir --windowed --optimize 2 --contents-directory . --upx-dir "D:/Syncthing/common/A_Program/upx-4.2.4-win64/" --add-data "../.venv/Lib/site-packages/customtkinter;customtkinter/" --add-data "../assets:assets" --version-file ../assets/files/version/file_version_info.txt -i ../assets/media/icon.ico ../code/aio.py -p ../code/common/clibs.py -p ../code/commom/openapi.py -p ../code/data_process/brake.py -p ../code/data_process/iso.py -p ../code/data_process/current.py -p ../code/data_process/wavelogger.py -p ../code/automatic_test/do_current.py -p ../code/automatic_test/do_brake.py -p ../code/durable_docs/factory_test.py -p ../code/durable_docs/create_plot.py --exclude-module=scipy
|
||||
pyinstaller --noconfirm --onedir --windowed --optimize 2 --add-data "../assets:assets" --contents-directory=resources --clean --upx-dir "D:/Syncthing/common/A_Program/upx-4.2.4-win64/" --name=aio --version-file=../assets/files/version/file_version_info.txt --icon=../assets/media/icon.ico --exclude-module=scipy ../aio.py
|
||||
```
|
||||
|
||||
### 2. tabview 组件字体修改
|
||||
|
119
test.py
119
test.py
@ -1,119 +0,0 @@
|
||||
def test(flag: int, **kwargs):
|
||||
print(f"flag = {flag}")
|
||||
print(f"kwargs = {kwargs}")
|
||||
|
||||
test(11, a=1,b="b")
|
||||
|
||||
import time
|
||||
|
||||
# import common.openapi as openapi
|
||||
#
|
||||
# hr = openapi.HmiRequest("10.2.21.252", 5050, 6666)
|
||||
# for _ in range(3):
|
||||
# hr.execution("controller.heart")
|
||||
# time.sleep(1)
|
||||
#
|
||||
# hr.close()
|
||||
|
||||
|
||||
|
||||
# import pymysql
|
||||
#
|
||||
# conn = pymysql.connect(host='10.2.20.216', user='root', password='Rokae_123457', port=13306, charset='utf8')
|
||||
# cursor = conn.cursor()
|
||||
# cursor.execute("SET autocommit = 1;")
|
||||
# cursor.execute("use fanmingfu;")
|
||||
# cursor.execute("insert into 20250315153551_log (module, level, content) values (%s, %s, %s)", ("aioaaaaaa", "debug", "testing information"))
|
||||
# logger("ERROR", "clibs", f"数据文件夹{dir_path}不存在,请确认后重试......\n", signal, "red", "PathNotExistError", idx)
|
||||
|
||||
# level = "ERROR"
|
||||
# module = "clibs"
|
||||
# content = "{'data': {'name': 'xCore'}, 'id': 'controller.heart-1742374255.8898985'}"
|
||||
# tb_name = "20250319162718_log"
|
||||
# cursor.execute(f"INSERT INTO {tb_name} (level, module, content) VALUES (%s, %s, %s)", (level, module, content))
|
||||
|
||||
# conn.commit()
|
||||
# ============================================
|
||||
# def tttt(flag, signal, cursor, **data):
|
||||
# if flag == "signal":
|
||||
# print(f"data = {data['signals']}")
|
||||
# elif flag == "cursor":
|
||||
# print(f"data = {data['cursors']}")
|
||||
# elif flag == "both":
|
||||
# print(f"data = {data}")
|
||||
# print(f"data = {data['signals']}")
|
||||
# print(f"data = {data['cursors']}")
|
||||
#
|
||||
#
|
||||
# tttt("both", 1, 1, signals=123, cursors=456)
|
||||
|
||||
# ============================================
|
||||
|
||||
# import sys
|
||||
# from time import sleep
|
||||
# from PySide6.QtCore import *
|
||||
# from PySide6.QtGui import *
|
||||
# from PySide6.QtWidgets import *
|
||||
#
|
||||
#
|
||||
# class MyWindow(QMainWindow):
|
||||
# range_number = Signal(int)
|
||||
#
|
||||
# def __init__(self) -> None:
|
||||
# super().__init__()
|
||||
# self.setWindowTitle("QThread学习")
|
||||
# self.resize(800, 600)
|
||||
# self.setup_ui()
|
||||
# self.setup_thread()
|
||||
#
|
||||
# def setup_ui(self):
|
||||
# self.mylistwidget = QListWidget(self)
|
||||
# self.mylistwidget.resize(500, 500)
|
||||
# self.mylistwidget.move(20, 20)
|
||||
#
|
||||
# self.additem_button = QPushButton(self)
|
||||
# self.additem_button.resize(150, 30)
|
||||
# self.additem_button.setText("填充QListWidget")
|
||||
# self.additem_button.move(530, 20)
|
||||
#
|
||||
# def setup_thread(self):
|
||||
# self.thread1 = QThread(self) # 创建一个线程
|
||||
# self.range_thread = WorkThread() # 实例化线程类
|
||||
# self.range_thread.moveToThread(self.thread1) # 将类移动到线程中运行
|
||||
# # 线程数据传回信号,用add_item函数处理
|
||||
# self.range_thread.range_requested.connect(self.add_item)
|
||||
# self.additem_button.clicked.connect(self.start_thread)
|
||||
# self.range_number.connect(self.range_thread.range_proc)
|
||||
# # self.additem_button.clicked.connect(self.range_thread.range_proc) # 连接到线程类的函数
|
||||
#
|
||||
# def start_thread(self):
|
||||
# self.thread1.start()
|
||||
# range_number = 30
|
||||
# self.range_number.emit(range_number) # 发射信号让线程接收需要range多少
|
||||
#
|
||||
# def add_item(self, requested_number): # 线程传回参数
|
||||
# text = f"第{requested_number}项————Item"
|
||||
# item = QListWidgetItem()
|
||||
# item.setIcon(QPixmap())
|
||||
# item.setText(text)
|
||||
# self.mylistwidget.addItem(item)
|
||||
#
|
||||
#
|
||||
# class WorkThread(QObject):
|
||||
# range_requested = Signal(int) # 括号里是传出的参数的类型
|
||||
#
|
||||
# def __init__(self):
|
||||
# super().__init__()
|
||||
#
|
||||
# def range_proc(self, number): # number即为从主线程接收的参数
|
||||
# print(number)
|
||||
# for i in range(number):
|
||||
# self.range_requested.emit(i) # 发射信号
|
||||
# sleep(0.5)
|
||||
#
|
||||
#
|
||||
# if __name__ == "__main__":
|
||||
# app = QApplication(sys.argv)
|
||||
# window = MyWindow()
|
||||
# window.show()
|
||||
# app.exec()
|
249
ui/login.ui
249
ui/login.ui
@ -1,249 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::WindowModality::WindowModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>270</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>270</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>270</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>登录</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset>
|
||||
<normaloff>../assets/media/icon.ico</normaloff>../assets/media/icon.ico</iconset>
|
||||
</property>
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>41</x>
|
||||
<y>41</y>
|
||||
<width>411</width>
|
||||
<height>211</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>用户名</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="le_username">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>密 码</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="le_password">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::EchoMode::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_hint">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_login">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>登录</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_reset">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>重置</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>btn_login</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>Form</receiver>
|
||||
<slot>user_login()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>85</x>
|
||||
<y>130</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>34</x>
|
||||
<y>112</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>le_password</sender>
|
||||
<signal>returnPressed()</signal>
|
||||
<receiver>Form</receiver>
|
||||
<slot>user_login()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>178</x>
|
||||
<y>82</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>11</x>
|
||||
<y>70</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>le_username</sender>
|
||||
<signal>returnPressed()</signal>
|
||||
<receiver>Form</receiver>
|
||||
<slot>user_login()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>169</x>
|
||||
<y>42</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>10</x>
|
||||
<y>33</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>btn_reset</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>Form</receiver>
|
||||
<slot>reset_password()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>311</x>
|
||||
<y>138</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>367</x>
|
||||
<y>113</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>user_login()</slot>
|
||||
<slot>reset_password()</slot>
|
||||
</slots>
|
||||
</ui>
|
15
ui/main.ui
15
ui/main.ui
@ -34,10 +34,6 @@
|
||||
<property name="windowTitle">
|
||||
<string>Rokae AIO</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset>
|
||||
<normaloff>../assets/media/icon.ico</normaloff>../assets/media/icon.ico</iconset>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(233, 233, 233);</string>
|
||||
</property>
|
||||
@ -184,7 +180,7 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>状态重置</string>
|
||||
<string>输出重置</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
@ -587,7 +583,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>212</width>
|
||||
<width>158</width>
|
||||
<height>78</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -1263,7 +1259,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>set_do</string>
|
||||
<string>setdo</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
@ -1281,6 +1277,11 @@
|
||||
<string>operating_mode</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>io_state</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>motor_on_state</string>
|
||||
|
271
ui/reset.ui
271
ui/reset.ui
@ -1,271 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::WindowModality::WindowModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>270</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>270</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>270</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>重置密码</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset>
|
||||
<normaloff>../assets/media/icon.ico</normaloff>../assets/media/icon.ico</iconset>
|
||||
</property>
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>27</y>
|
||||
<width>411</width>
|
||||
<height>211</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>用户名</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="le_username">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>旧密码</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="le_old_password">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::EchoMode::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>新密码</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="le_new_password_1">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::EchoMode::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确 认</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="le_new_password_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::EchoMode::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_hint">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_reset">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确定</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_cancel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Consolas</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>le_username</tabstop>
|
||||
<tabstop>le_old_password</tabstop>
|
||||
<tabstop>le_new_password_1</tabstop>
|
||||
<tabstop>le_new_password_2</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>btn_reset</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>Form</receiver>
|
||||
<slot>reset_password()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>85</x>
|
||||
<y>175</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>22</x>
|
||||
<y>149</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>btn_cancel</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>Form</receiver>
|
||||
<slot>reset_cancel()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>295</x>
|
||||
<y>177</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>386</x>
|
||||
<y>148</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>reset_password()</slot>
|
||||
<slot>reset_cancel()</slot>
|
||||
</slots>
|
||||
</ui>
|
Loading…
x
Reference in New Issue
Block a user