--- /dev/null
+import sys
+import socket
+import time
+import threading
+from PyQt5.QtWidgets import QApplication, QMainWindow
+from PyQt5.QtCore import pyqtSignal
+from PyQt5.QtGui import QTextCursor
+from test_ui import Ui_WiFiClientApp
+
+class WiFiClientApp(QMainWindow, Ui_WiFiClientApp):
+ log_signal = pyqtSignal(str, str) # message, type: 'send'/'receive'/'info'/'error'
+ connect_signal = pyqtSignal(bool)
+
+ def __init__(self):
+ super().__init__()
+
+ # 初始化UI
+ self.setupUi(self)
+ self.setGeometry(100, 100, 1000, 550) # 调整窗口大小
+
+ # 设置日志文本框支持HTML
+ self.log_text.setAcceptRichText(True)
+
+ # TCP连接状态
+ self.socket = None
+ self.connected = False
+
+ # 协议状态码映射
+ self.status_codes = {
+ '0': 'OK',
+ '1': 'InvalidJob',
+ '2': 'InvalidPset',
+ '3': 'NoResult',
+ '4': 'NoGraph',
+ '5': 'PullResult',
+ '6': 'PushResult',
+ '7': 'CRC',
+ '8': 'InvalidData',
+ '9': 'CmdNotFounded',
+ '10': 'ReadError',
+ '11': 'WriteError',
+ '12': 'TimeOut'
+ }
+
+ # 协议响应字段定义
+ self.response_fields = {
+ 'ASVI': ['MID', 'VER', 'SN', 'TG', 'STATUS', 'ToolName', 'ToolType', 'FirmWare', 'Span', 'TighteingingID'],
+ 'ASTS': ['MID', 'VER', 'SN', 'TG', 'STATUS', 'WrenchStatus', 'WrenchEnable', 'HaveResult'],
+ 'ASTD': ['MID', 'VER', 'SN', 'TG', 'STATUS', 'Reserve', 'TighteningID', 'VIN', 'TimeStamp', 'BatchSize',
+ 'BatchCounter', 'PsetID', 'PsetName', 'TorqueMin', 'TorqueTarget', 'TorqueMax', 'AngleMin',
+ 'AngleTarget', 'AngleMax', 'Status', 'TorqueStatus', 'AngleStatus', 'Torque', 'Angle'],
+ 'ASSP': ['MID', 'VER', 'SN', 'TG', 'STATUS'],
+ 'ASEN': ['MID', 'VER', 'SN', 'TG', 'STATUS'],
+ 'ASTG': ['MID', 'VER', 'SN', 'TG', 'STATUS', 'Reserve', 'TighteningID', 'VIN', 'TimeStamp', 'BatchSize',
+ 'BatchCounter', 'PsetID', 'PsetName', 'TorqueMin', 'TorqueTarget', 'TorqueMax', 'AngleMin',
+ 'AngleTarget', 'AngleMax', 'Status', 'TorqueStatus', 'AngleStatus', 'Torque', 'Angle',
+ 'Mode', 'Samples', 'Frequency', 'Torque Point', 'Points']
+ }
+
+ # 连接信号
+ self.log_signal.connect(self.add_log)
+ self.connect_signal.connect(self.update_connect_button)
+
+ # 绑定按钮事件
+ self.btn_connect.clicked.connect(self.toggle_connection)
+ self.btn_clear_log.clicked.connect(self.clear_log)
+
+ # 绑定指令按钮事件
+ self.btn_rsvi.clicked.connect(self.send_rsvi_command)
+ self.btn_rsts.clicked.connect(self.send_rsts_command)
+ self.btn_rstd.clicked.connect(self.send_rstd_command)
+ self.btn_rstg.clicked.connect(self.send_rstg_command)
+ self.btn_rsen_enable.clicked.connect(self.send_rsen_enable_command)
+ self.btn_rsen_disable.clicked.connect(self.send_rsen_disable_command)
+ self.btn_rssp.clicked.connect(self.send_rssp_command)
+
+ # 设置默认值
+ self.line_VER.setText("01")
+ self.line_SN.setText("123456")
+ self.line_TG.setText("01")
+ self.line_JobID.setText("SN1234")
+ self.line_JobName.setText("TEST_JOB")
+ self.server_ip.setText("192.168.4.1")
+ self.server_port.setText("8888")
+
+ # 启动接收线程
+ self.running = True
+ self.receive_thread = threading.Thread(target=self.receive_data)
+ self.receive_thread.daemon = True
+ self.receive_thread.start()
+
+ def add_log(self, message, log_type='info'):
+ """记录日志,支持富文本显示"""
+ # 根据日志类型设置不同的颜色
+ color_map = {
+ 'send': '#0000FF', # 蓝色:发送的数据
+ 'receive': '#008000', # 绿色:接收的数据
+ 'info': '#000000', # 黑色:普通信息
+ 'error': '#FF0000' # 红色:错误信息
+ }
+
+ color = color_map.get(log_type, color_map['info'])
+
+ # 检查是否需要解析协议数据
+ if log_type == 'receive' and message.startswith('接收数据: '):
+ raw_data = message[len('接收数据: '):]
+ self.log_text.append(f'<span style="color:{color};">{message}</span>')
+ self.parse_protocol_data(raw_data)
+ else:
+ # 普通日志消息
+ self.log_text.append(f'<span style="color:{color};">{message}</span>')
+
+ self.log_text.ensureCursorVisible()
+
+ def parse_protocol_data(self, data):
+ """解析协议数据并以表格形式展示"""
+ try:
+ # 分割数据
+ fields = data.split(';')
+ if not fields:
+ return
+
+ mid = fields[0]
+ if mid not in self.response_fields:
+ return
+
+ # 获取字段名列表
+ field_names = self.response_fields[mid]
+
+ # 确保字段数量匹配
+ num_fields = min(len(fields), len(field_names))
+
+ # 开始构建HTML表格 - 优化样式以支持长数据的多行显示
+ table_html = '<table border="1" cellpadding="5" cellspacing="0" style="margin: 10px 0; border-collapse: collapse; word-break: break-all; max-width: 100%;">\n'
+
+ # 对于长数据(RSTD和RSTG)使用分组显示
+ if mid in ['ASTD', 'ASTG']:
+ # 分为基本信息、结果信息、参数信息等多个表格
+ self.display_long_data(mid, fields, field_names, table_html)
+ else:
+ # 普通数据使用单行表格
+ self.display_normal_data(fields, field_names, num_fields, table_html)
+
+ except Exception as e:
+ self.log_signal.emit(f"解析协议数据失败: {e}", 'error')
+
+ def display_normal_data(self, fields, field_names, num_fields, table_html):
+ """显示普通长度的数据"""
+ # 添加表头
+ table_html += '<tr bgcolor="#CCCCCC">\n'
+ for name in field_names[:num_fields]:
+ table_html += f'<th style="max-width: 150px; word-break: break-all;">{name}</th>\n'
+ table_html += '</tr>\n'
+
+ # 添加数据行
+ table_html += '<tr>\n'
+ for i in range(num_fields):
+ field_value = fields[i]
+
+ # 特殊处理STATUS字段,显示文本描述
+ if field_names[i] == 'STATUS' and field_value in self.status_codes:
+ field_value = f"{field_value} ({self.status_codes[field_value]})"
+
+ # 为不同类型的字段设置不同的颜色
+ cell_color = '#FFFFFF'
+ if field_names[i] == 'STATUS':
+ if field_value.startswith('0'):
+ cell_color = '#CCFFCC' # 绿色背景表示成功
+ else:
+ cell_color = '#FFCCCC' # 红色背景表示失败
+ elif field_names[i] in ['Torque', 'Angle']:
+ cell_color = '#FFFFCC' # 黄色背景表示测量值
+
+ table_html += f'<td style="max-width: 150px; word-break: break-all;" bgcolor="{cell_color}">{field_value}</td>\n'
+ table_html += '</tr>\n'
+ table_html += '</table>'
+
+ # 添加解析后的表格
+ self.log_text.append(table_html)
+
+ def display_long_data(self, mid, fields, field_names, table_html):
+ """显示长数据,使用多行表格布局"""
+ num_fields = min(len(fields), len(field_names))
+
+ # 对于长数据,我们将字段分组显示,每组显示在单独的行中
+ # 基本信息分组
+ basic_info = ['MID', 'VER', 'SN', 'TG', 'STATUS']
+
+ # 结果信息分组
+ result_info = ['Reserve', 'TighteningID', 'VIN', 'TimeStamp']
+
+ # 批次信息分组
+ batch_info = ['BatchSize', 'BatchCounter', 'PsetID', 'PsetName']
+
+ # 扭矩信息分组
+ torque_info = ['TorqueMin', 'TorqueTarget', 'TorqueMax', 'Torque', 'TorqueStatus']
+
+ # 角度信息分组
+ angle_info = ['AngleMin', 'AngleTarget', 'AngleMax', 'Angle', 'AngleStatus']
+
+ # 其他信息分组
+ other_info = []
+
+ # 确定其他信息分组(针对RSTG命令)
+ if mid == 'ASTG':
+ other_info = ['Mode', 'Samples', 'Frequency', 'Torque Point', 'Points']
+
+ # 所有分组列表
+ groups = [
+ ('基本信息', basic_info),
+ ('结果信息', result_info),
+ ('批次信息', batch_info),
+ ('扭矩信息', torque_info),
+ ('角度信息', angle_info)
+ ]
+
+ if other_info:
+ groups.append(('其他信息', other_info))
+
+ # 为每个分组创建一个小型表格
+ for group_name, group_fields in groups:
+ self.log_text.append(f'<h4 style="margin: 10px 0; color: #333;">{group_name}</h4>')
+
+ # 创建分组表格
+ group_table = '<table border="1" cellpadding="3" cellspacing="0" style="margin: 5px 0 15px 0; border-collapse: collapse; word-break: break-all; max-width: 100%;">\n'
+
+ # 找出当前分组的字段在总字段列表中的索引
+ for field_name in group_fields:
+ if field_name in field_names:
+ index = field_names.index(field_name)
+ if index < num_fields:
+ field_value = fields[index]
+
+ # 特殊处理STATUS字段
+ if field_name == 'STATUS' and field_value in self.status_codes:
+ field_value = f"{field_value} ({self.status_codes[field_value]})"
+
+ # 设置单元格颜色
+ cell_color = '#FFFFFF'
+ if field_name == 'STATUS':
+ if field_value.startswith('0'):
+ cell_color = '#CCFFCC' # 绿色背景表示成功
+ else:
+ cell_color = '#FFCCCC' # 红色背景表示失败
+ elif field_name in ['Torque', 'Angle']:
+ cell_color = '#FFFFCC' # 黄色背景表示测量值
+
+ # 添加数据行
+ group_table += '<tr>\n'
+ group_table += f'<th style="max-width: 120px; background-color: #CCCCCC; text-align: left; padding: 3px 8px;">{field_name}</th>\n'
+ group_table += f'<td style="max-width: 300px; word-break: break-all; padding: 3px 8px;" bgcolor="{cell_color}">{field_value}</td>\n'
+ group_table += '</tr>\n'
+
+ group_table += '</table>'
+ self.log_text.append(group_table)
+
+ def clear_log(self):
+ """清除日志"""
+ self.log_text.clear()
+
+ def toggle_connection(self):
+ """切换连接状态"""
+ if not self.connected:
+ # 连接服务器
+ try:
+ ip = self.server_ip.text()
+ port = int(self.server_port.text())
+ self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ self.socket.connect((ip, port))
+ self.connected = True
+ self.connect_signal.emit(True)
+ self.log_signal.emit(f"已连接到服务器: {ip}:{port}", 'info')
+ except Exception as e:
+ self.log_signal.emit(f"连接失败: {e}", 'error')
+ else:
+ # 断开连接
+ try:
+ self.socket.close()
+ self.connected = False
+ self.connect_signal.emit(False)
+ self.log_signal.emit("已断开与服务器的连接", 'info')
+ except Exception as e:
+ self.log_signal.emit(f"断开连接失败: {e}", 'error')
+
+ def update_connect_button(self, connected):
+ """更新连接按钮状态"""
+ if connected:
+ self.btn_connect.setText("断开连接")
+ self.btn_connect.setStyleSheet("background-color: #FF6B6B; color: white;")
+ else:
+ self.btn_connect.setText("连接服务器")
+ self.btn_connect.setStyleSheet("background-color: #4CAF50; color: white;")
+
+ def send_command(self, mid, ver, sn, tg, params):
+ """发送指令"""
+ if not self.connected:
+ self.log_signal.emit("请先连接服务器", 'info')
+ return
+
+ # 构建指令
+ cmd_parts = [mid, ver, sn, tg] + params
+ cmd = ";".join(cmd_parts) + "\r\n"
+
+ try:
+ self.socket.sendall(cmd.encode())
+ self.log_signal.emit(f"发送指令: {cmd.strip()}", 'send')
+ except Exception as e:
+ self.log_signal.emit(f"发送指令失败: {e}", 'error')
+ self.connected = False
+ self.connect_signal.emit(False)
+
+ def receive_data(self):
+ """接收数据线程"""
+ while self.running:
+ if self.connected:
+ try:
+ data = self.socket.recv(1024)
+ if data:
+ self.log_signal.emit(f"接收数据: {data.decode().strip()}", 'receive')
+ except Exception as e:
+ if self.connected:
+ self.log_signal.emit(f"接收数据失败: {e}", 'error')
+ self.connected = False
+ self.connect_signal.emit(False)
+ else:
+ time.sleep(0.5)
+
+ def send_rsvi_command(self):
+ """发送RSVI指令"""
+ mid = "RSVI"
+ ver = self.line_VER.text()
+ sn = self.line_SN.text()
+ tg = self.line_TG.text()
+ params = []
+ self.send_command(mid, ver, sn, tg, params)
+
+ def send_rsts_command(self):
+ """发送RSTS指令"""
+ mid = "RSTS"
+ ver = self.line_VER.text()
+ sn = self.line_SN.text()
+ tg = self.line_TG.text()
+ params = []
+ self.send_command(mid, ver, sn, tg, params)
+
+ def send_rstd_command(self):
+ """发送RSTD指令"""
+ mid = "RSTD"
+ ver = self.line_VER.text()
+ sn = self.line_SN.text()
+ tg = self.line_TG.text()
+ params = []
+ self.send_command(mid, ver, sn, tg, params)
+
+ def send_rstg_command(self):
+ """发送RSTG指令"""
+ mid = "RSTG"
+ ver = self.line_VER.text()
+ sn = self.line_SN.text()
+ tg = self.line_TG.text()
+ params = []
+ self.send_command(mid, ver, sn, tg, params)
+
+ def send_rsen_enable_command(self):
+ """发送RSEN Enable指令"""
+ mid = "RSEN"
+ ver = self.line_VER.text()
+ sn = self.line_SN.text()
+ tg = self.line_TG.text()
+ params = [self.line_JobID.text(), "00", "1"]
+ self.send_command(mid, ver, sn, tg, params)
+
+ def send_rsen_disable_command(self):
+ """发送RSEN Disable指令"""
+ mid = "RSEN"
+ ver = self.line_VER.text()
+ sn = self.line_SN.text()
+ tg = self.line_TG.text()
+ params = [self.line_JobID.text(), "00", "0"]
+ self.send_command(mid, ver, sn, tg, params)
+
+ def send_rssp_command(self):
+ """发送RSSP指令"""
+ mid = "RSSP"
+ ver = self.line_VER.text()
+ sn = self.line_SN.text()
+ tg = self.line_TG.text()
+ server = self.line_JobID.text()
+ job = self.line_JobName.text()
+
+ # 获取参数值
+ strategy = str(self.combo_Strategy.currentIndex())
+ rotation = str(self.combo_Rotation.currentIndex())
+ cycle_end_time = str(self.combo_CycleEndTime.currentIndex())
+ repeat = str(self.combo_Repeat.currentIndex())
+
+ param1 = self.line_StartTorque.text()
+ param2 = self.line_TorqueMin.text()
+ param3 = self.line_TorqueTarget.text()
+ param4 = self.line_TorqueMax.text()
+ param5 = self.line_StartAngle.text()
+ param6 = self.line_AngleMin.text()
+ param7 = self.line_AngleTarget.text()
+ param8 = self.line_AngleMax.text()
+ param9 = self.line_BatchSize.text()
+ param10 = self.line_Repair.text()
+
+ params = [server, job, strategy, rotation, cycle_end_time, repeat,
+ param1, param2, param3, param4, param5, param6, param7, param8, param9, param10]
+ self.send_command(mid, ver, sn, tg, params)
+
+ def closeEvent(self, event):
+ """窗口关闭事件"""
+ self.running = False
+ if self.connected:
+ self.socket.close()
+ event.accept()
+
+if __name__ == "__main__":
+ app = QApplication(sys.argv)
+ window = WiFiClientApp()
+ window.show()
+ sys.exit(app.exec_())
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>WiFiClientApp</class>
+ <widget class="QMainWindow" name="WiFiClientApp">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>1007</width>
+ <height>683</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>WiFi扳手下位机客户端</string>
+ </property>
+ <widget class="QWidget" name="centralwidget">
+ <widget class="QGroupBox" name="groupBox_3">
+ <property name="geometry">
+ <rect>
+ <x>410</x>
+ <y>20</y>
+ <width>591</width>
+ <height>651</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string/>
+ </property>
+ <widget class="QTextEdit" name="log_text">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>0</y>
+ <width>571</width>
+ <height>641</height>
+ </rect>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>301</width>
+ <height>91</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>服务器配置</string>
+ </property>
+ <widget class="QPushButton" name="btn_connect">
+ <property name="geometry">
+ <rect>
+ <x>220</x>
+ <y>20</y>
+ <width>71</width>
+ <height>61</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>连接</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_2">
+ <property name="geometry">
+ <rect>
+ <x>50</x>
+ <y>50</y>
+ <width>30</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>端口:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="server_port">
+ <property name="geometry">
+ <rect>
+ <x>130</x>
+ <y>50</y>
+ <width>60</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>8888</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label">
+ <property name="geometry">
+ <rect>
+ <x>50</x>
+ <y>20</y>
+ <width>42</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>IP地址:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="server_ip">
+ <property name="geometry">
+ <rect>
+ <x>110</x>
+ <y>20</y>
+ <width>81</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>192.168.4.1</string>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QGroupBox" name="groupBox_6">
+ <property name="geometry">
+ <rect>
+ <x>320</x>
+ <y>10</y>
+ <width>91</width>
+ <height>441</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>发送命令</string>
+ </property>
+ <widget class="QPushButton" name="btn_rsvi">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>61</width>
+ <height>51</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>读信息</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="btn_rsts">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>80</y>
+ <width>61</width>
+ <height>51</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>读状态</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="btn_rstd">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>140</y>
+ <width>61</width>
+ <height>51</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>读数据</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="btn_rstg">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>200</y>
+ <width>61</width>
+ <height>51</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>读曲线</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="btn_rsen_enable">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>260</y>
+ <width>61</width>
+ <height>51</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>启用</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="btn_rsen_disable">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>320</y>
+ <width>61</width>
+ <height>51</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>禁用</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="btn_rssp">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>380</y>
+ <width>61</width>
+ <height>51</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>选JOB</string>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QScrollArea" name="scrollArea">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>110</y>
+ <width>301</width>
+ <height>361</height>
+ </rect>
+ </property>
+ <property name="widgetResizable">
+ <bool>true</bool>
+ </property>
+ <widget class="QWidget" name="scrollAreaWidgetContents">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>299</width>
+ <height>359</height>
+ </rect>
+ </property>
+ <widget class="QGroupBox" name="groupBox_4">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>281</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string/>
+ </property>
+ <widget class="QLabel" name="label_3">
+ <property name="geometry">
+ <rect>
+ <x>130</x>
+ <y>10</y>
+ <width>30</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>版本</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_VER">
+ <property name="geometry">
+ <rect>
+ <x>160</x>
+ <y>10</y>
+ <width>31</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_4">
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>13</y>
+ <width>21</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>SN</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_SN">
+ <property name="geometry">
+ <rect>
+ <x>40</x>
+ <y>10</y>
+ <width>81</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>SN1234</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_TG">
+ <property name="geometry">
+ <rect>
+ <x>240</x>
+ <y>10</y>
+ <width>31</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="cmd_TG">
+ <property name="geometry">
+ <rect>
+ <x>210</x>
+ <y>10</y>
+ <width>30</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>组别</string>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QGroupBox" name="groupBox_5">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>60</y>
+ <width>281</width>
+ <height>291</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>JOB</string>
+ </property>
+ <widget class="QLabel" name="label_7">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>42</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Job编号</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_JobID">
+ <property name="geometry">
+ <rect>
+ <x>60</x>
+ <y>20</y>
+ <width>71</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>123456</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" name="combo_Rotation">
+ <property name="geometry">
+ <rect>
+ <x>70</x>
+ <y>110</y>
+ <width>60</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <item>
+ <property name="text">
+ <string>0</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>2</string>
+ </property>
+ </item>
+ </widget>
+ <widget class="QLabel" name="label_rssp_strategy">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>80</y>
+ <width>51</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>拧紧策略</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_rssp_rotation">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>106</y>
+ <width>31</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>方向</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" name="combo_Strategy">
+ <property name="geometry">
+ <rect>
+ <x>70</x>
+ <y>80</y>
+ <width>60</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <item>
+ <property name="text">
+ <string>0</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>2</string>
+ </property>
+ </item>
+ </widget>
+ <widget class="QLineEdit" name="line_JobName">
+ <property name="geometry">
+ <rect>
+ <x>60</x>
+ <y>50</y>
+ <width>71</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>TEST_JOB</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_8">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>50</y>
+ <width>42</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Job名字</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_StartTorque">
+ <property name="geometry">
+ <rect>
+ <x>70</x>
+ <y>140</y>
+ <width>61</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>100</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_9">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>140</y>
+ <width>51</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>起始扭矩</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_TorqueMin">
+ <property name="geometry">
+ <rect>
+ <x>70</x>
+ <y>170</y>
+ <width>61</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>200</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_TorqueMin">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>170</y>
+ <width>51</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>扭矩下限</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_TorqueTarget">
+ <property name="geometry">
+ <rect>
+ <x>70</x>
+ <y>200</y>
+ <width>61</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>300</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_11">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>200</y>
+ <width>51</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>目标扭矩</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_TorqueMax">
+ <property name="geometry">
+ <rect>
+ <x>70</x>
+ <y>230</y>
+ <width>61</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>400</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_12">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>230</y>
+ <width>51</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>扭矩上限</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_13">
+ <property name="geometry">
+ <rect>
+ <x>150</x>
+ <y>110</y>
+ <width>51</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>角度上限</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_StartAngle">
+ <property name="geometry">
+ <rect>
+ <x>210</x>
+ <y>20</y>
+ <width>61</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>20</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_AngleMax">
+ <property name="geometry">
+ <rect>
+ <x>210</x>
+ <y>110</y>
+ <width>61</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>100</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_14">
+ <property name="geometry">
+ <rect>
+ <x>150</x>
+ <y>80</y>
+ <width>51</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>目标角度</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_15">
+ <property name="geometry">
+ <rect>
+ <x>150</x>
+ <y>20</y>
+ <width>51</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>起始角度</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_16">
+ <property name="geometry">
+ <rect>
+ <x>150</x>
+ <y>50</y>
+ <width>51</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>角度下限</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_AngleTarget">
+ <property name="geometry">
+ <rect>
+ <x>210</x>
+ <y>80</y>
+ <width>61</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>90</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_AngleMin">
+ <property name="geometry">
+ <rect>
+ <x>210</x>
+ <y>50</y>
+ <width>61</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>0</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_BatchSize">
+ <property name="geometry">
+ <rect>
+ <x>210</x>
+ <y>140</y>
+ <width>61</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_17">
+ <property name="geometry">
+ <rect>
+ <x>150</x>
+ <y>140</y>
+ <width>51</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>次数</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_18">
+ <property name="geometry">
+ <rect>
+ <x>150</x>
+ <y>170</y>
+ <width>51</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>等待时间</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_19">
+ <property name="geometry">
+ <rect>
+ <x>150</x>
+ <y>200</y>
+ <width>51</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>补偿长度</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_Distance">
+ <property name="geometry">
+ <rect>
+ <x>210</x>
+ <y>200</y>
+ <width>61</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_Counter">
+ <property name="geometry">
+ <rect>
+ <x>210</x>
+ <y>230</y>
+ <width>61</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_20">
+ <property name="geometry">
+ <rect>
+ <x>150</x>
+ <y>230</y>
+ <width>51</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>计数模式</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_rssp_strategy_2">
+ <property name="geometry">
+ <rect>
+ <x>150</x>
+ <y>260</y>
+ <width>51</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>模式</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" name="combo_Repeat">
+ <property name="geometry">
+ <rect>
+ <x>210</x>
+ <y>260</y>
+ <width>60</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <item>
+ <property name="text">
+ <string>0 - Lock</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>1 - Repeat </string>
+ </property>
+ </item>
+ </widget>
+ <widget class="QLabel" name="label_21">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>260</y>
+ <width>51</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>返修次数</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="line_Repair">
+ <property name="geometry">
+ <rect>
+ <x>70</x>
+ <y>260</y>
+ <width>61</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>0</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" name="combo_CycleEndTime">
+ <property name="geometry">
+ <rect>
+ <x>210</x>
+ <y>170</y>
+ <width>60</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <item>
+ <property name="text">
+ <string>0 - 0.1 s</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>1 - 0.2 s</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>2 - 0.5 s</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>3 - 1 s</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>4 - 2 s</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>5 - 5 s</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>6 - 10 s</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>7 - 20 s</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>8 - 30 s</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>9 - 60 s</string>
+ </property>
+ </item>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+ <widget class="QPushButton" name="btn_clear_log">
+ <property name="geometry">
+ <rect>
+ <x>330</x>
+ <y>630</y>
+ <width>61</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>清除日志</string>
+ </property>
+ </widget>
+ </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>