update 更新一键投料,优化设置文字,添加平滑,假装解决闪退
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
from enum import Enum
|
||||
|
||||
import numpy as np
|
||||
from PySide6.QtCore import Signal
|
||||
import Constant
|
||||
from Model.Position import Real_Position
|
||||
from Trace.handeye_calibration import getPosition
|
||||
from Util.util_time import CClockPulse, CTon
|
||||
from Vision.camera_coordinate_dete import Detection
|
||||
|
||||
|
||||
class DetectStatus(Enum):
|
||||
@ -12,8 +14,9 @@ class DetectStatus(Enum):
|
||||
DOk = 2
|
||||
|
||||
class Detect:
|
||||
def __init__(self,detection):
|
||||
self.detection = detection
|
||||
update_detect_image = Signal(np.ndarray)
|
||||
def __init__(self):
|
||||
self.detection = Detection(alignmentType='depth2color')
|
||||
self.detect_status = DetectStatus.DNone
|
||||
self.detect_position = None
|
||||
def run(self):
|
||||
|
||||
@ -4,8 +4,10 @@ import threading
|
||||
import time
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
from PyQt5.QtWidgets import QMessageBox
|
||||
from PySide6.QtCore import Signal, QObject
|
||||
from PySide6.QtGui import QPixmap
|
||||
|
||||
import Constant
|
||||
import Expection
|
||||
@ -129,8 +131,25 @@ class FeedLine:
|
||||
def set_take_position(self,position:Real_Position):
|
||||
for i in range(len(self.feeding_to_end)):
|
||||
if self.feeding_to_end[i].status == FeedStatus.FTake.value:
|
||||
if position != None:
|
||||
befor_take_position = Real_Position().init_position(position.X,
|
||||
position.Y,
|
||||
position.Z,
|
||||
position.U,
|
||||
position.V,
|
||||
position.W)
|
||||
after_take_position = Real_Position().init_position(position.X,
|
||||
position.Y,
|
||||
position.Z,
|
||||
position.U,
|
||||
position.V,
|
||||
position.W)
|
||||
self.feeding_to_end[i - 1].set_position(befor_take_position)
|
||||
self.feeding_to_end[i + 1].set_position(after_take_position)
|
||||
|
||||
self.feeding_to_end[i].set_position(position)
|
||||
|
||||
|
||||
def get_position_list(self):
|
||||
index_start = -1
|
||||
for i in range(len(self.feed_positions)):
|
||||
@ -145,6 +164,17 @@ class FeedLine:
|
||||
self.start_to_take = self.feed_positions[index_start:index_take+1]
|
||||
self.feeding_to_end = self.feed_positions[index_take:]
|
||||
|
||||
for i in range(len(self.feeding_to_end)): #插入动态中间点
|
||||
if self.feeding_to_end[i].status == FeedStatus.FTake.value:
|
||||
befor_position_model = PositionModel()
|
||||
befor_position_model.init_position(None)
|
||||
after_position_model = PositionModel()
|
||||
after_position_model.init_position(None)
|
||||
|
||||
self.feeding_to_end.insert(i, befor_position_model)
|
||||
self.feeding_to_end.insert(i+2, after_position_model)
|
||||
break
|
||||
|
||||
|
||||
|
||||
class FeedingConfig:
|
||||
@ -164,13 +194,14 @@ class FeedingConfig:
|
||||
|
||||
class Feeding(QObject):
|
||||
need_origin_signal = Signal(str)
|
||||
take_no_photo_sigal = Signal(str)
|
||||
def __init__(self, robotClient: RobotClient, detection: Detection):
|
||||
take_no_photo_sigal = Signal()
|
||||
update_detect_image = Signal(np.ndarray)
|
||||
def __init__(self, robotClient: RobotClient):
|
||||
super().__init__()
|
||||
self.feedConfig = None
|
||||
self.feedStatus = FeedStatus.FNone
|
||||
self.robotClient = robotClient
|
||||
self.detection = detection
|
||||
|
||||
self.detection_image = None
|
||||
self.init_detection_image()
|
||||
self.pause = False
|
||||
@ -187,14 +218,21 @@ class Feeding(QObject):
|
||||
self.pos_index = -1
|
||||
self.pos_near_index = -1
|
||||
self.catch = Catch(self.robotClient)
|
||||
self.detect = Detect(self.detection)
|
||||
self.detect = Detect()
|
||||
self.is_detected = True
|
||||
self.detect_thread = threading.Thread(target=self.run_detect)
|
||||
self.detect_thread.start()
|
||||
self.onekey = False
|
||||
pass
|
||||
|
||||
def close_feed(self):
|
||||
self.is_detected = False
|
||||
self.detect_thread.join()
|
||||
self.detect.detection.release()
|
||||
|
||||
def init_detection_image(self):
|
||||
self.detection_image = cv2.imread(Constant.feed_sign_path)
|
||||
detection_image = cv2.imread(Constant.feed_sign_path)
|
||||
self.update_detect_image.emit(detection_image)
|
||||
|
||||
def run_detect(self):
|
||||
while self.is_detected:
|
||||
@ -271,12 +309,6 @@ class Feeding(QObject):
|
||||
|
||||
self.feedConfig.feedLine.get_position_list()
|
||||
self.detect.detect_status = DetectStatus.DNone
|
||||
# = self.detection.get_position(Point_isVision=False, Box_isPoint=True, First_Depth=True, Iter_Max_Pixel=30,
|
||||
# # save_img_point=0, Height_reduce=30, width_reduce=30)
|
||||
|
||||
|
||||
# TODO 获取目标位置
|
||||
#
|
||||
self.feed_Mid_Status = FeedMidStatus.FMid_Start
|
||||
self.next_position(self.is_reverse)
|
||||
|
||||
@ -298,6 +330,7 @@ class Feeding(QObject):
|
||||
self.feedConfig.feedLine.start2take_pos_index = len(self.feedConfig.feedLine.start_to_take) -2
|
||||
self.feedConfig.feedLine.origin2start_pos_index = len(self.feedConfig.feedLine.origin_to_start) - 2
|
||||
self.next_position(self.is_reverse)
|
||||
self.init_detection_image()
|
||||
return
|
||||
|
||||
if self.robotClient.type_detection == DetectType.EyeOutHand:
|
||||
@ -306,19 +339,28 @@ class Feeding(QObject):
|
||||
self.detect.detect_status = DetectStatus.DDetect
|
||||
elif self.detect.detect_status == DetectStatus.DOk:
|
||||
if Constant.Debug:
|
||||
if self.feedConfig.num == 990 and self.onekey:
|
||||
self.feedConfig.num = 0
|
||||
log.log_message(logging.ERROR, Constant.str_feed_finish)
|
||||
return
|
||||
self.detect.detect_status = DetectStatus.DNone
|
||||
self.feedConfig.feedLine.set_take_position(real_position)
|
||||
self.next_position()
|
||||
return
|
||||
|
||||
if self.detect.detect_position != None:
|
||||
log.log_message(logging.INFO, Constant.str_feed_takePhoto_success)
|
||||
self.feedConfig.feedLine.set_take_position(self.detect.detect_position)
|
||||
self.detection_image = self.detect.detection_image
|
||||
self.update_detect_image.emit(self.detect.detection_image)
|
||||
self.next_position()
|
||||
self.detect.detect_status = DetectStatus.DNone
|
||||
else:
|
||||
log.log_message(logging.ERROR, Constant.str_feed_takePhoto_fail)
|
||||
self.take_no_photo_sigal.emit()
|
||||
if self.onekey:
|
||||
self.feedConfig.num = 0
|
||||
log.log_message(logging.ERROR, Constant.str_feed_finish)
|
||||
else:
|
||||
log.log_message(logging.ERROR, Constant.str_feed_takePhoto_fail)
|
||||
self.take_no_photo_sigal.emit()
|
||||
return
|
||||
detect_pos_list = []
|
||||
if not Constant.Debug:
|
||||
@ -391,7 +433,7 @@ class Feeding(QObject):
|
||||
log.log_message(logging.INFO, Constant.str_feed_take)
|
||||
if self.feedConfig.feedLine.get_take_position().get_position() != None:
|
||||
# self.take_no_photo = False
|
||||
if self.feedConfig.feedLine.get_take_position().get_position().compare(real_position):
|
||||
if self.feedConfig.feedLine.get_take_position().get_position().compare(real_position, is_action=True):
|
||||
# 打开吸嘴并返回
|
||||
# self.sendIOControl(self.robotClient.con_ios[0], 1)
|
||||
# self.sendIOControl(self.robotClient.con_ios[1], 1)
|
||||
@ -405,7 +447,7 @@ class Feeding(QObject):
|
||||
return
|
||||
if self.catch.catch_status == CatchStatus.COk :
|
||||
self.catch.catch_status = CatchStatus.CNone
|
||||
self.feedConfig.feedLine.set_take_position(None)
|
||||
#self.feedConfig.feedLine.set_take_position(None)
|
||||
time.sleep(self.robotClient.time_delay_take)
|
||||
log.log_message(logging.INFO, Constant.str_feed_take_success)
|
||||
self.next_position()
|
||||
@ -434,7 +476,7 @@ class Feeding(QObject):
|
||||
|
||||
elif self.feedStatus == FeedStatus.FShake:
|
||||
log.log_message(logging.INFO, Constant.str_feed_shake)
|
||||
if self.get_current_position().get_position().compare(real_position):
|
||||
if self.get_current_position().get_position().compare(real_position,is_action=True):
|
||||
# TODO 震动方案
|
||||
|
||||
|
||||
@ -451,7 +493,7 @@ class Feeding(QObject):
|
||||
elif self.feedStatus == FeedStatus.FDropBag:
|
||||
log.log_message(logging.INFO, Constant.str_feed_drop)
|
||||
|
||||
if self.get_current_position().get_position().compare(real_position):
|
||||
if self.get_current_position().get_position().compare(real_position,is_action=True):
|
||||
# self.sendIOControl(self.robotClient.con_ios[0], 0)
|
||||
# self.sendIOControl(self.robotClient.con_ios[1], 0)
|
||||
# self.sendIOControl(self.robotClient.con_ios[2], 0)
|
||||
|
||||
@ -3,7 +3,8 @@ import os
|
||||
Debug = True
|
||||
IO_EmergencyPoint = 3
|
||||
bag_height = 10 # 一袋的高度
|
||||
position_accuracy = 0.1
|
||||
position_accuracy_action = 0.1 #动作时的位置精度6 这个精度要高 必须到位置才做动作
|
||||
position_accuracy_command = 6#命令时的位置精度
|
||||
manual_adjust_accuracy = 1
|
||||
# speed = 10
|
||||
# shake_speed = 20
|
||||
|
||||
223
MainWin.ui
223
MainWin.ui
@ -4143,7 +4143,7 @@ background-color: #197971;
|
||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>放取延时:</string>
|
||||
<string>抛袋延时:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -4243,7 +4243,7 @@ background-color: #499c8a;
|
||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>收放点位:</string>
|
||||
<string>抓取点位:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -4272,7 +4272,7 @@ background-color: #499c8a;
|
||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>按压点位:</string>
|
||||
<string>抛袋点位:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -4306,7 +4306,7 @@ background-color: #499c8a;
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_timedelay_shake">
|
||||
<widget class="QLineEdit" name="lineEdit_timedelay_take">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@ -4330,12 +4330,12 @@ background-color: #499c8a;
|
||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>震动延时:</string>
|
||||
<string>抓取延时:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QLineEdit" name="lineEdit_timedelay_take">
|
||||
<widget class="QLineEdit" name="lineEdit_timedelay_shake">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@ -4359,7 +4359,36 @@ background-color: #499c8a;
|
||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>吸取延时:</string>
|
||||
<string>摇晃延时:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLabel" name="label_89">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>平滑系数:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QLineEdit" name="lineEdit_setting_smooth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -5597,9 +5626,9 @@ background-color: #499c8a;
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Shadow::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" rowstretch="1,1,1" columnstretch="1,1,0" rowminimumheight="2,2,2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="pushButton_startFeed">
|
||||
<layout class="QGridLayout" name="gridLayout_2" rowstretch="1,1,1,1" columnstretch="1,1,0" rowminimumheight="2,2,2,0">
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QPushButton" name="pushButton_reset">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@ -5608,54 +5637,25 @@ background-color: #499c8a;
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">*{
|
||||
background-color: #499C54;
|
||||
font: 9pt "楷体";
|
||||
|
||||
border-radius: 10px;
|
||||
}
|
||||
*:pressed
|
||||
{
|
||||
background-color: #499c8a;
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>启动</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="QIcon::ThemeIcon::MediaPlaybackStart"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QPushButton" name="pushButton_pauseFeed">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">*{
|
||||
background-color: #2196F3;
|
||||
background-color: #FFFFBF;
|
||||
font: 9pt "楷体";
|
||||
border-radius: 10px;
|
||||
}
|
||||
*:pressed
|
||||
{
|
||||
background-color: #499c8a;
|
||||
background-color: #FFF000;
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>暂停</string>
|
||||
<string>复位</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="QIcon::ThemeIcon::MediaPlaybackPause"/>
|
||||
<iconset theme="media-optical"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QPushButton" name="pushButton_emergency">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
@ -5684,36 +5684,7 @@ background-color: #ff6e00;
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QPushButton" name="pushButton_clearAlarm">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">*{
|
||||
background-color: #1CB2B1;
|
||||
font: 9pt "楷体";
|
||||
border-radius: 10px;
|
||||
}
|
||||
*:pressed
|
||||
{
|
||||
background-color:#1cb052;
|
||||
}
|
||||
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>清除报警</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="QIcon::ThemeIcon::SystemReboot"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="pushButton_stopFeed">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
@ -5742,7 +5713,7 @@ background-color: #499c8a;
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QPushButton" name="pushButton_reset">
|
||||
<widget class="QPushButton" name="pushButton_pauseFeed">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@ -5751,21 +5722,115 @@ background-color: #499c8a;
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">*{
|
||||
background-color: #FFFFBF;
|
||||
background-color: #2196F3;
|
||||
font: 9pt "楷体";
|
||||
border-radius: 10px;
|
||||
}
|
||||
*:pressed
|
||||
{
|
||||
background-color: #FFF000;
|
||||
background-color: #499c8a;
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>复位</string>
|
||||
<string>暂停</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="media-optical"/>
|
||||
<iconset theme="QIcon::ThemeIcon::MediaPlaybackPause"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pushButton_startFeed">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">*{
|
||||
background-color: #499C54;
|
||||
font: 9pt "楷体";
|
||||
|
||||
border-radius: 10px;
|
||||
}
|
||||
*:pressed
|
||||
{
|
||||
background-color: #499c8a;
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>启动</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="QIcon::ThemeIcon::MediaPlaybackStart"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="QPushButton" name="pushButton_clearAlarm">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">*{
|
||||
background-color: #1CB2B1;
|
||||
font: 9pt "楷体";
|
||||
border-radius: 10px;
|
||||
}
|
||||
*:pressed
|
||||
{
|
||||
background-color:#1cb052;
|
||||
}
|
||||
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>清除报警</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="QIcon::ThemeIcon::SystemReboot"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="pushButton_onekeyfeed">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">*{
|
||||
background-color: rgb(0, 170, 0);
|
||||
|
||||
font: 9pt "楷体";
|
||||
border-radius: 10px;
|
||||
}
|
||||
*:pressed
|
||||
{
|
||||
background-color:#1cb052;
|
||||
}
|
||||
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>一键投料</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="QIcon::ThemeIcon::DocumentSend"/>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import math
|
||||
|
||||
from Constant import position_accuracy
|
||||
from Constant import position_accuracy_command
|
||||
from Constant import position_accuracy_action
|
||||
class Position:
|
||||
def __init__(self):
|
||||
self.X = 0.0
|
||||
@ -10,18 +11,19 @@ class Position:
|
||||
self.V = 0.0
|
||||
self.W = 0.0
|
||||
|
||||
def compare(self,position):
|
||||
def compare(self,position,is_action=False):
|
||||
distance = math.sqrt((self.X-position.X)**2+
|
||||
(self.Y-position.Y)**2+
|
||||
(self.Z - position.Z)**2+
|
||||
(self.U - position.U)**2+
|
||||
(self.V - position.V)**2+
|
||||
(self.W - position.W) ** 2)
|
||||
if distance<=position_accuracy:
|
||||
if distance<=(position_accuracy_action if is_action else position_accuracy_command):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
# def compare(self,position):
|
||||
# if self.X-position.X<position_accuracy and \
|
||||
# self.Y-position.Y<position_accuracy and \
|
||||
@ -74,5 +76,8 @@ class Real_Position(Position):
|
||||
self.W = W
|
||||
return self
|
||||
|
||||
# def init_position(self, position):
|
||||
# return self.init_position(position.X,position.Y,position.Z,position.U,position.V,position.W)
|
||||
|
||||
def to_string(self):
|
||||
return "X:{:.3f},Y:{:.3f},Z:{:.3f},U:{:.3f},V:{:.3f},W:{:.3f}".format(self.X,self.Y,self.Z,self.U,self.V,self.W)
|
||||
@ -47,7 +47,7 @@ photo_v5 = 0.0
|
||||
photo_w5 = 1.0
|
||||
linecount = 2
|
||||
remain_linename = 1
|
||||
remain_count = 1
|
||||
remain_count = 999
|
||||
io_take_addr = 8
|
||||
io_zip_addr = 11
|
||||
io_shake_addr = 12
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import logging
|
||||
|
||||
import cv2
|
||||
from PIL.ImageQt import QImage, QPixmap
|
||||
from PySide6.QtGui import QPixmap, QImage
|
||||
|
||||
from Util.util_log import log
|
||||
|
||||
@ -11,11 +11,11 @@ def cv2_to_qpixmap(cv_img):
|
||||
# img = cv_img.copy()
|
||||
# cv_img = cv2.cvtColor(cv_img, cv2.COLOR_BGR2RGB)
|
||||
try:
|
||||
img = cv_img.copy()
|
||||
height, width, channel = img.shape
|
||||
bytes_per_line = 3 * width
|
||||
q_img = QImage(img.data, width, height, bytes_per_line, QImage.Format_RGB888)
|
||||
return QPixmap.fromImage(q_img)
|
||||
height, width, channel = cv_img.shape
|
||||
bytes_per_line = channel * width
|
||||
q_image = QImage(cv_img.data, width, height, bytes_per_line, QImage.Format_RGB888)
|
||||
pixmap = QPixmap.fromImage(q_image)
|
||||
return pixmap
|
||||
except Exception as e:
|
||||
print(e)
|
||||
log.log_message(logging.ERROR,e)
|
||||
|
||||
16717
log/log.log
16717
log/log.log
File diff suppressed because it is too large
Load Diff
45
main.py
45
main.py
@ -10,6 +10,7 @@ import traceback
|
||||
|
||||
import PySide6
|
||||
import cv2
|
||||
import numpy as np
|
||||
from PyQt5.uic.properties import QtWidgets
|
||||
from PySide6 import QtCore
|
||||
from PySide6.QtCore import QThread, Signal, Slot, QObject, QEvent, QTimer
|
||||
@ -449,7 +450,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
combox.addItem("初始化点", 2)
|
||||
combox.addItem("中间点", 3)
|
||||
combox.addItem("相机/待抓点",4)
|
||||
combox.addItem("抓取前点", 3)
|
||||
combox.addItem("抓取",5)
|
||||
combox.addItem("抓取后点", 3)
|
||||
combox.addItem("破带点1",6)
|
||||
combox.addItem("破带点2",7)
|
||||
combox.addItem("震动点",8)
|
||||
@ -563,7 +566,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
self.pushButton_leftmenu_baseSeting.clicked.connect(lambda _, index=3: self.send_click_change_stackView(index))
|
||||
self.pushButton_leftmenu_posDebug.clicked.connect(lambda _, index=4: self.send_click_change_stackView(index))
|
||||
self.pushButton_exit.clicked.connect(self.send_exit_button_click)
|
||||
|
||||
self.pushButton_onekeyfeed.clicked.connect(self.send_onekeyfeed_button_click)
|
||||
|
||||
int_validator = QIntValidator(0, 100, self.lineEdit_num)
|
||||
self.lineEdit_num.setValidator(int_validator)
|
||||
@ -582,14 +585,13 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
def init_Run(self):
|
||||
self.robotClient = None
|
||||
self.configReader = configparser.ConfigParser()
|
||||
self.detection =Detection() #TODO 关闭图像
|
||||
#TODO 关闭图像
|
||||
self.command_position_quene = Queue()
|
||||
self.status_address = DataAddress()
|
||||
self.feedLine_dict = {}
|
||||
self.command_quene = Queue()
|
||||
self.main_threading = None
|
||||
self.detection_person = None # DetectionPerson()
|
||||
self.cton_take_no_photo = CRisOrFall()
|
||||
self.index = 1
|
||||
|
||||
self.configReader.read(Constant.set_ini)
|
||||
@ -638,9 +640,10 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
self.robotClient.feed_speed = feed_speed
|
||||
self.robotClient.reset_speed = reset_speed
|
||||
self.robotClient.max_angle_interval = max_angle_interval
|
||||
self.feeding = Feeding(self.robotClient, self.detection) # 临时
|
||||
self.feeding = Feeding(self.robotClient) # 临时
|
||||
self.feeding.need_origin_signal.connect(self.show_infomessage_box)
|
||||
self.feeding.take_no_photo_sigal.emit(self.show_no_photo_message_box)
|
||||
self.feeding.take_no_photo_sigal.connect(self.show_no_photo_message_box)
|
||||
self.feeding.update_detect_image.connect(self.updateUI_label_detection)
|
||||
self.last_time = time.time()
|
||||
self.remain_lineName = self.configReader.get('Robot_Feed', 'remain_lineName')
|
||||
self.remain_Count = int(self.configReader.get('Robot_Feed', 'remain_Count'))
|
||||
@ -899,6 +902,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
# self.stackedWidget_num.setCurrentIndex(1)
|
||||
self.set_run_status_button(True)
|
||||
self.feeding.pause = False
|
||||
self.feeding.onekey = False
|
||||
log.log_message(logging.INFO, f'{self.feedLine_dict[line_head].name}:{Constant.str_feed_start}')
|
||||
|
||||
def send_num_button_click(self):
|
||||
@ -1318,8 +1322,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
try:
|
||||
self.feeding.run()
|
||||
self.feeding.run_reset()
|
||||
except:
|
||||
print(Error_Code.SYS_NONEPoint)
|
||||
except Exception as e:
|
||||
log.log_message(logging.ERROR, e)
|
||||
|
||||
|
||||
# pass #主线程
|
||||
@ -1371,7 +1375,6 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
|
||||
def update_seting_frame(self):
|
||||
self.updateUI_Position()
|
||||
self.updateUI_label_detection()
|
||||
self.updateUI_label_status()
|
||||
self.updateUI_frame_sign(self.feeding.feedStatus)
|
||||
self.updateUI_IOPanel()
|
||||
@ -1386,6 +1389,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
|
||||
@Slot()
|
||||
def show_no_photo_message_box(self):
|
||||
print("显示弹窗图片")
|
||||
self.feeding.pause = True
|
||||
self.send_pause_command(pause=1)
|
||||
msg_box_person = QMessageBox()
|
||||
@ -1412,8 +1416,10 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
except Exception as e:
|
||||
log.log_message(logging.ERROR, Constant.str_sys_log_IO_error)
|
||||
pass
|
||||
def updateUI_label_detection(self):
|
||||
backgroud_img = Util.util_pic.cv2_to_qpixmap(self.feeding.detection_image)
|
||||
@Slot()
|
||||
def updateUI_label_detection(self,img:np.ndarray):
|
||||
img_copy = np.copy(img)
|
||||
backgroud_img = Util.util_pic.cv2_to_qpixmap(img_copy)
|
||||
if backgroud_img == None:
|
||||
return
|
||||
backgroud_img = backgroud_img.scaled(self.label_showDetection.size().width(),self.label_showDetection.size().height(), Qt.AspectRatioMode.IgnoreAspectRatio,Qt.TransformationMode.SmoothTransformation)
|
||||
@ -1892,6 +1898,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
self.lineEdit_timedelay_shake.setText(str(self.robotClient.time_delay_shake))
|
||||
|
||||
def show_infomessage_box(self,message):
|
||||
print('显示弹窗')
|
||||
msg_box = QMessageBox(self)
|
||||
msg_box.setWindowTitle("提示")
|
||||
msg_box.setText(message)
|
||||
@ -1908,6 +1915,18 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
if index == 3:
|
||||
self.updateUI_Base_Set()
|
||||
|
||||
def send_onekeyfeed_button_click(self):
|
||||
# if self.feeding.feedStatus != FeedStatus.FNone:
|
||||
# self.show_infomessage_box("正在执行")
|
||||
# return
|
||||
|
||||
self.horizontalSlider_feedingNum.setMaximum(999)
|
||||
self.label_maxNum.setText(str(999))
|
||||
self.horizontalSlider_feedingNum.setValue(0)
|
||||
|
||||
self.send_startFeed_button_click()
|
||||
self.feeding.onekey = True
|
||||
|
||||
def send_exit_button_click(self):
|
||||
self.closeEvent(None)
|
||||
QApplication.quit()
|
||||
@ -1935,9 +1954,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
|
||||
def closeEvent(self, event):
|
||||
self.record_remain_num()
|
||||
self.feeding.is_detected = False
|
||||
self.feeding.detect_thread.join()
|
||||
self.detection.release()
|
||||
# self.feeding.is_detected = False
|
||||
# self.feeding.detect_thread.join()
|
||||
self.feeding.close_feed()
|
||||
self.thread_signal = False
|
||||
self.robotClient.close()
|
||||
log.log_message(logging.INFO, Constant.str_sys_exit)
|
||||
|
||||
215
ui_MainWin.py
215
ui_MainWin.py
@ -2602,13 +2602,13 @@ class Ui_MainWindow(object):
|
||||
|
||||
self.gridLayout_6.addWidget(self.lineEdit_shake_addr, 2, 3, 1, 1)
|
||||
|
||||
self.lineEdit_timedelay_shake = QLineEdit(self.frame_29)
|
||||
self.lineEdit_timedelay_shake.setObjectName(u"lineEdit_timedelay_shake")
|
||||
sizePolicy1.setHeightForWidth(self.lineEdit_timedelay_shake.sizePolicy().hasHeightForWidth())
|
||||
self.lineEdit_timedelay_shake.setSizePolicy(sizePolicy1)
|
||||
self.lineEdit_timedelay_shake.setStyleSheet(u"color: rgb(255, 255, 255);")
|
||||
self.lineEdit_timedelay_take = QLineEdit(self.frame_29)
|
||||
self.lineEdit_timedelay_take.setObjectName(u"lineEdit_timedelay_take")
|
||||
sizePolicy1.setHeightForWidth(self.lineEdit_timedelay_take.sizePolicy().hasHeightForWidth())
|
||||
self.lineEdit_timedelay_take.setSizePolicy(sizePolicy1)
|
||||
self.lineEdit_timedelay_take.setStyleSheet(u"color: rgb(255, 255, 255);")
|
||||
|
||||
self.gridLayout_6.addWidget(self.lineEdit_timedelay_shake, 3, 1, 1, 1)
|
||||
self.gridLayout_6.addWidget(self.lineEdit_timedelay_take, 3, 1, 1, 1)
|
||||
|
||||
self.label_87 = QLabel(self.frame_29)
|
||||
self.label_87.setObjectName(u"label_87")
|
||||
@ -2618,13 +2618,13 @@ class Ui_MainWindow(object):
|
||||
|
||||
self.gridLayout_6.addWidget(self.label_87, 3, 0, 1, 1)
|
||||
|
||||
self.lineEdit_timedelay_take = QLineEdit(self.frame_29)
|
||||
self.lineEdit_timedelay_take.setObjectName(u"lineEdit_timedelay_take")
|
||||
sizePolicy1.setHeightForWidth(self.lineEdit_timedelay_take.sizePolicy().hasHeightForWidth())
|
||||
self.lineEdit_timedelay_take.setSizePolicy(sizePolicy1)
|
||||
self.lineEdit_timedelay_take.setStyleSheet(u"color: rgb(255, 255, 255);")
|
||||
self.lineEdit_timedelay_shake = QLineEdit(self.frame_29)
|
||||
self.lineEdit_timedelay_shake.setObjectName(u"lineEdit_timedelay_shake")
|
||||
sizePolicy1.setHeightForWidth(self.lineEdit_timedelay_shake.sizePolicy().hasHeightForWidth())
|
||||
self.lineEdit_timedelay_shake.setSizePolicy(sizePolicy1)
|
||||
self.lineEdit_timedelay_shake.setStyleSheet(u"color: rgb(255, 255, 255);")
|
||||
|
||||
self.gridLayout_6.addWidget(self.lineEdit_timedelay_take, 3, 3, 1, 1)
|
||||
self.gridLayout_6.addWidget(self.lineEdit_timedelay_shake, 3, 3, 1, 1)
|
||||
|
||||
self.label_85 = QLabel(self.frame_29)
|
||||
self.label_85.setObjectName(u"label_85")
|
||||
@ -2634,6 +2634,22 @@ class Ui_MainWindow(object):
|
||||
|
||||
self.gridLayout_6.addWidget(self.label_85, 3, 2, 1, 1)
|
||||
|
||||
self.label_89 = QLabel(self.frame_29)
|
||||
self.label_89.setObjectName(u"label_89")
|
||||
sizePolicy4.setHeightForWidth(self.label_89.sizePolicy().hasHeightForWidth())
|
||||
self.label_89.setSizePolicy(sizePolicy4)
|
||||
self.label_89.setStyleSheet(u"color: rgb(255, 255, 255);")
|
||||
|
||||
self.gridLayout_6.addWidget(self.label_89, 4, 2, 1, 1)
|
||||
|
||||
self.lineEdit_setting_smooth = QLineEdit(self.frame_29)
|
||||
self.lineEdit_setting_smooth.setObjectName(u"lineEdit_setting_smooth")
|
||||
sizePolicy1.setHeightForWidth(self.lineEdit_setting_smooth.sizePolicy().hasHeightForWidth())
|
||||
self.lineEdit_setting_smooth.setSizePolicy(sizePolicy1)
|
||||
self.lineEdit_setting_smooth.setStyleSheet(u"color: rgb(255, 255, 255);")
|
||||
|
||||
self.gridLayout_6.addWidget(self.lineEdit_setting_smooth, 4, 3, 1, 1)
|
||||
|
||||
self.gridLayout_6.setRowStretch(0, 1)
|
||||
self.gridLayout_6.setRowStretch(1, 1)
|
||||
self.gridLayout_6.setRowStretch(2, 1)
|
||||
@ -3510,44 +3526,24 @@ class Ui_MainWindow(object):
|
||||
self.frame_21.setFrameShadow(QFrame.Shadow.Raised)
|
||||
self.gridLayout_2 = QGridLayout(self.frame_21)
|
||||
self.gridLayout_2.setObjectName(u"gridLayout_2")
|
||||
self.pushButton_startFeed = QPushButton(self.frame_21)
|
||||
self.pushButton_startFeed.setObjectName(u"pushButton_startFeed")
|
||||
sizePolicy5.setHeightForWidth(self.pushButton_startFeed.sizePolicy().hasHeightForWidth())
|
||||
self.pushButton_startFeed.setSizePolicy(sizePolicy5)
|
||||
self.pushButton_startFeed.setStyleSheet(u"*{\n"
|
||||
"background-color: #499C54;\n"
|
||||
"font: 9pt \"\u6977\u4f53\";\n"
|
||||
"\n"
|
||||
"border-radius: 10px;\n"
|
||||
"}\n"
|
||||
"*:pressed\n"
|
||||
"{\n"
|
||||
"background-color: #499c8a;\n"
|
||||
"}\n"
|
||||
"")
|
||||
icon8 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.MediaPlaybackStart))
|
||||
self.pushButton_startFeed.setIcon(icon8)
|
||||
|
||||
self.gridLayout_2.addWidget(self.pushButton_startFeed, 0, 0, 1, 1)
|
||||
|
||||
self.pushButton_pauseFeed = QPushButton(self.frame_21)
|
||||
self.pushButton_pauseFeed.setObjectName(u"pushButton_pauseFeed")
|
||||
sizePolicy5.setHeightForWidth(self.pushButton_pauseFeed.sizePolicy().hasHeightForWidth())
|
||||
self.pushButton_pauseFeed.setSizePolicy(sizePolicy5)
|
||||
self.pushButton_pauseFeed.setStyleSheet(u"*{\n"
|
||||
"background-color: #2196F3;\n"
|
||||
self.pushButton_reset = QPushButton(self.frame_21)
|
||||
self.pushButton_reset.setObjectName(u"pushButton_reset")
|
||||
sizePolicy5.setHeightForWidth(self.pushButton_reset.sizePolicy().hasHeightForWidth())
|
||||
self.pushButton_reset.setSizePolicy(sizePolicy5)
|
||||
self.pushButton_reset.setStyleSheet(u"*{\n"
|
||||
"background-color: #FFFFBF;\n"
|
||||
"font: 9pt \"\u6977\u4f53\";\n"
|
||||
"border-radius: 10px;\n"
|
||||
"}\n"
|
||||
"*:pressed\n"
|
||||
"{\n"
|
||||
"background-color: #499c8a;\n"
|
||||
"background-color: #FFF000;\n"
|
||||
"}\n"
|
||||
"")
|
||||
icon9 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.MediaPlaybackPause))
|
||||
self.pushButton_pauseFeed.setIcon(icon9)
|
||||
icon8 = QIcon(QIcon.fromTheme(u"media-optical"))
|
||||
self.pushButton_reset.setIcon(icon8)
|
||||
|
||||
self.gridLayout_2.addWidget(self.pushButton_pauseFeed, 0, 1, 1, 2)
|
||||
self.gridLayout_2.addWidget(self.pushButton_reset, 2, 1, 1, 2)
|
||||
|
||||
self.pushButton_emergency = QPushButton(self.frame_21)
|
||||
self.pushButton_emergency.setObjectName(u"pushButton_emergency")
|
||||
@ -3564,10 +3560,68 @@ class Ui_MainWindow(object):
|
||||
"}\n"
|
||||
"\n"
|
||||
"")
|
||||
icon10 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.WindowClose))
|
||||
self.pushButton_emergency.setIcon(icon10)
|
||||
icon9 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.WindowClose))
|
||||
self.pushButton_emergency.setIcon(icon9)
|
||||
|
||||
self.gridLayout_2.addWidget(self.pushButton_emergency, 2, 0, 1, 1)
|
||||
self.gridLayout_2.addWidget(self.pushButton_emergency, 3, 0, 1, 1)
|
||||
|
||||
self.pushButton_stopFeed = QPushButton(self.frame_21)
|
||||
self.pushButton_stopFeed.setObjectName(u"pushButton_stopFeed")
|
||||
sizePolicy5.setHeightForWidth(self.pushButton_stopFeed.sizePolicy().hasHeightForWidth())
|
||||
self.pushButton_stopFeed.setSizePolicy(sizePolicy5)
|
||||
self.pushButton_stopFeed.setStyleSheet(u"*{\n"
|
||||
"background-color: #FF0000;\n"
|
||||
"font: 9pt \"\u6977\u4f53\";\n"
|
||||
"border-radius: 10px;\n"
|
||||
"}\n"
|
||||
"*:pressed\n"
|
||||
"{\n"
|
||||
"background-color: #499c8a;\n"
|
||||
"}\n"
|
||||
"")
|
||||
icon10 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.SystemShutdown))
|
||||
self.pushButton_stopFeed.setIcon(icon10)
|
||||
|
||||
self.gridLayout_2.addWidget(self.pushButton_stopFeed, 2, 0, 1, 1)
|
||||
|
||||
self.pushButton_pauseFeed = QPushButton(self.frame_21)
|
||||
self.pushButton_pauseFeed.setObjectName(u"pushButton_pauseFeed")
|
||||
sizePolicy5.setHeightForWidth(self.pushButton_pauseFeed.sizePolicy().hasHeightForWidth())
|
||||
self.pushButton_pauseFeed.setSizePolicy(sizePolicy5)
|
||||
self.pushButton_pauseFeed.setStyleSheet(u"*{\n"
|
||||
"background-color: #2196F3;\n"
|
||||
"font: 9pt \"\u6977\u4f53\";\n"
|
||||
"border-radius: 10px;\n"
|
||||
"}\n"
|
||||
"*:pressed\n"
|
||||
"{\n"
|
||||
"background-color: #499c8a;\n"
|
||||
"}\n"
|
||||
"")
|
||||
icon11 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.MediaPlaybackPause))
|
||||
self.pushButton_pauseFeed.setIcon(icon11)
|
||||
|
||||
self.gridLayout_2.addWidget(self.pushButton_pauseFeed, 1, 1, 1, 2)
|
||||
|
||||
self.pushButton_startFeed = QPushButton(self.frame_21)
|
||||
self.pushButton_startFeed.setObjectName(u"pushButton_startFeed")
|
||||
sizePolicy5.setHeightForWidth(self.pushButton_startFeed.sizePolicy().hasHeightForWidth())
|
||||
self.pushButton_startFeed.setSizePolicy(sizePolicy5)
|
||||
self.pushButton_startFeed.setStyleSheet(u"*{\n"
|
||||
"background-color: #499C54;\n"
|
||||
"font: 9pt \"\u6977\u4f53\";\n"
|
||||
"\n"
|
||||
"border-radius: 10px;\n"
|
||||
"}\n"
|
||||
"*:pressed\n"
|
||||
"{\n"
|
||||
"background-color: #499c8a;\n"
|
||||
"}\n"
|
||||
"")
|
||||
icon12 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.MediaPlaybackStart))
|
||||
self.pushButton_startFeed.setIcon(icon12)
|
||||
|
||||
self.gridLayout_2.addWidget(self.pushButton_startFeed, 1, 0, 1, 1)
|
||||
|
||||
self.pushButton_clearAlarm = QPushButton(self.frame_21)
|
||||
self.pushButton_clearAlarm.setObjectName(u"pushButton_clearAlarm")
|
||||
@ -3584,52 +3638,37 @@ class Ui_MainWindow(object):
|
||||
"}\n"
|
||||
"\n"
|
||||
"")
|
||||
icon11 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.SystemReboot))
|
||||
self.pushButton_clearAlarm.setIcon(icon11)
|
||||
icon13 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.SystemReboot))
|
||||
self.pushButton_clearAlarm.setIcon(icon13)
|
||||
|
||||
self.gridLayout_2.addWidget(self.pushButton_clearAlarm, 2, 1, 1, 2)
|
||||
self.gridLayout_2.addWidget(self.pushButton_clearAlarm, 3, 1, 1, 2)
|
||||
|
||||
self.pushButton_stopFeed = QPushButton(self.frame_21)
|
||||
self.pushButton_stopFeed.setObjectName(u"pushButton_stopFeed")
|
||||
sizePolicy5.setHeightForWidth(self.pushButton_stopFeed.sizePolicy().hasHeightForWidth())
|
||||
self.pushButton_stopFeed.setSizePolicy(sizePolicy5)
|
||||
self.pushButton_stopFeed.setStyleSheet(u"*{\n"
|
||||
"background-color: #FF0000;\n"
|
||||
self.pushButton_onekeyfeed = QPushButton(self.frame_21)
|
||||
self.pushButton_onekeyfeed.setObjectName(u"pushButton_onekeyfeed")
|
||||
sizePolicy5.setHeightForWidth(self.pushButton_onekeyfeed.sizePolicy().hasHeightForWidth())
|
||||
self.pushButton_onekeyfeed.setSizePolicy(sizePolicy5)
|
||||
self.pushButton_onekeyfeed.setStyleSheet(u"*{\n"
|
||||
"background-color: rgb(0, 170, 0);\n"
|
||||
"\n"
|
||||
"font: 9pt \"\u6977\u4f53\";\n"
|
||||
"border-radius: 10px;\n"
|
||||
"}\n"
|
||||
"*:pressed\n"
|
||||
"{\n"
|
||||
"background-color: #499c8a;\n"
|
||||
"background-color:#1cb052;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"")
|
||||
icon12 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.SystemShutdown))
|
||||
self.pushButton_stopFeed.setIcon(icon12)
|
||||
icon14 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.DocumentSend))
|
||||
self.pushButton_onekeyfeed.setIcon(icon14)
|
||||
self.pushButton_onekeyfeed.setIconSize(QSize(20, 20))
|
||||
|
||||
self.gridLayout_2.addWidget(self.pushButton_stopFeed, 1, 0, 1, 1)
|
||||
|
||||
self.pushButton_reset = QPushButton(self.frame_21)
|
||||
self.pushButton_reset.setObjectName(u"pushButton_reset")
|
||||
sizePolicy5.setHeightForWidth(self.pushButton_reset.sizePolicy().hasHeightForWidth())
|
||||
self.pushButton_reset.setSizePolicy(sizePolicy5)
|
||||
self.pushButton_reset.setStyleSheet(u"*{\n"
|
||||
"background-color: #FFFFBF;\n"
|
||||
"font: 9pt \"\u6977\u4f53\";\n"
|
||||
"border-radius: 10px;\n"
|
||||
"}\n"
|
||||
"*:pressed\n"
|
||||
"{\n"
|
||||
"background-color: #FFF000;\n"
|
||||
"}\n"
|
||||
"")
|
||||
icon13 = QIcon(QIcon.fromTheme(u"media-optical"))
|
||||
self.pushButton_reset.setIcon(icon13)
|
||||
|
||||
self.gridLayout_2.addWidget(self.pushButton_reset, 1, 1, 1, 2)
|
||||
self.gridLayout_2.addWidget(self.pushButton_onekeyfeed, 0, 0, 1, 2)
|
||||
|
||||
self.gridLayout_2.setRowStretch(0, 1)
|
||||
self.gridLayout_2.setRowStretch(1, 1)
|
||||
self.gridLayout_2.setRowStretch(2, 1)
|
||||
self.gridLayout_2.setRowStretch(3, 1)
|
||||
self.gridLayout_2.setColumnStretch(0, 1)
|
||||
self.gridLayout_2.setColumnStretch(1, 1)
|
||||
self.gridLayout_2.setRowMinimumHeight(0, 2)
|
||||
@ -3925,14 +3964,15 @@ class Ui_MainWindow(object):
|
||||
self.label_17.setText(QCoreApplication.translate("MainWindow", u"Z2:", None))
|
||||
self.label_28.setText(QCoreApplication.translate("MainWindow", u"\u751f\u4ea7\u901f\u5ea6\uff1a", None))
|
||||
self.label_94.setText(QCoreApplication.translate("MainWindow", u"\u590d\u4f4d\u901f\u5ea6\uff1a", None))
|
||||
self.label_86.setText(QCoreApplication.translate("MainWindow", u"\u653e\u53d6\u5ef6\u65f6\uff1a", None))
|
||||
self.label_86.setText(QCoreApplication.translate("MainWindow", u"\u629b\u888b\u5ef6\u65f6\uff1a", None))
|
||||
self.pushButton_saveSeting.setText(QCoreApplication.translate("MainWindow", u"\u4fdd\u5b58\u8bbe\u7f6e", None))
|
||||
self.label_29.setText(QCoreApplication.translate("MainWindow", u"\u8c03\u8bd5\u901f\u5ea6\uff1a", None))
|
||||
self.label_51.setText(QCoreApplication.translate("MainWindow", u"\u6536\u653e\u70b9\u4f4d:", None))
|
||||
self.label_52.setText(QCoreApplication.translate("MainWindow", u"\u6309\u538b\u70b9\u4f4d\uff1a", None))
|
||||
self.label_51.setText(QCoreApplication.translate("MainWindow", u"\u6293\u53d6\u70b9\u4f4d:", None))
|
||||
self.label_52.setText(QCoreApplication.translate("MainWindow", u"\u629b\u888b\u70b9\u4f4d\uff1a", None))
|
||||
self.label_54.setText(QCoreApplication.translate("MainWindow", u"\u6447\u6643\u70b9\u4f4d:", None))
|
||||
self.label_87.setText(QCoreApplication.translate("MainWindow", u"\u9707\u52a8\u5ef6\u65f6\uff1a", None))
|
||||
self.label_85.setText(QCoreApplication.translate("MainWindow", u"\u5438\u53d6\u5ef6\u65f6\uff1a", None))
|
||||
self.label_87.setText(QCoreApplication.translate("MainWindow", u"\u6293\u53d6\u5ef6\u65f6\uff1a", None))
|
||||
self.label_85.setText(QCoreApplication.translate("MainWindow", u"\u6447\u6643\u5ef6\u65f6\uff1a", None))
|
||||
self.label_89.setText(QCoreApplication.translate("MainWindow", u"\u5e73\u6ed1\u7cfb\u6570\uff1a", None))
|
||||
self.pushButton_j3_add.setText("")
|
||||
self.pushButton_j5_add.setText("")
|
||||
self.pushButton_j6_sub.setText("")
|
||||
@ -3993,12 +4033,13 @@ class Ui_MainWindow(object):
|
||||
self.pushButton_num_confirm.setText(QCoreApplication.translate("MainWindow", u"\u786e\u5b9a", None))
|
||||
self.pushButton_AddNum.setText(QCoreApplication.translate("MainWindow", u"\u8865\u4e00\u888b", None))
|
||||
self.pushButton_SubNum.setText(QCoreApplication.translate("MainWindow", u"\u6263\u4e00\u888b", None))
|
||||
self.pushButton_startFeed.setText(QCoreApplication.translate("MainWindow", u"\u542f\u52a8", None))
|
||||
self.pushButton_pauseFeed.setText(QCoreApplication.translate("MainWindow", u"\u6682\u505c", None))
|
||||
self.pushButton_emergency.setText(QCoreApplication.translate("MainWindow", u"\u6025\u505c", None))
|
||||
self.pushButton_clearAlarm.setText(QCoreApplication.translate("MainWindow", u"\u6e05\u9664\u62a5\u8b66", None))
|
||||
self.pushButton_stopFeed.setText(QCoreApplication.translate("MainWindow", u"\u505c\u6b62", None))
|
||||
self.pushButton_reset.setText(QCoreApplication.translate("MainWindow", u"\u590d\u4f4d", None))
|
||||
self.pushButton_emergency.setText(QCoreApplication.translate("MainWindow", u"\u6025\u505c", None))
|
||||
self.pushButton_stopFeed.setText(QCoreApplication.translate("MainWindow", u"\u505c\u6b62", None))
|
||||
self.pushButton_pauseFeed.setText(QCoreApplication.translate("MainWindow", u"\u6682\u505c", None))
|
||||
self.pushButton_startFeed.setText(QCoreApplication.translate("MainWindow", u"\u542f\u52a8", None))
|
||||
self.pushButton_clearAlarm.setText(QCoreApplication.translate("MainWindow", u"\u6e05\u9664\u62a5\u8b66", None))
|
||||
self.pushButton_onekeyfeed.setText(QCoreApplication.translate("MainWindow", u"\u4e00\u952e\u6295\u6599", None))
|
||||
self.label_4.setText(QCoreApplication.translate("MainWindow", u"\u76ee\u6807\u888b\u6570\uff1a", None))
|
||||
self.label_maxNum.setText(QCoreApplication.translate("MainWindow", u"0", None))
|
||||
self.label_6.setText(QCoreApplication.translate("MainWindow", u"\u5269\u4f59\u888b\u6570\uff1a", None))
|
||||
|
||||
Reference in New Issue
Block a user