update 更新命令发送错误,自由路径配置失误,图片显示实物

This commit is contained in:
Gogs
2024-12-14 17:09:45 +08:00
parent 1efd0385e1
commit e2b60094b3
5 changed files with 115 additions and 82 deletions

10
main.py
View File

@ -8,6 +8,7 @@ from multiprocessing import Process
import traceback
import PySide6
import cv2
from PyQt5.uic.properties import QtWidgets
from PySide6 import QtCore
from PySide6.QtCore import QThread, Signal, Slot, QObject, QEvent, QTimer
@ -589,6 +590,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.main_threading = None
self.detection_person = None # DetectionPerson()
self.cton_take_no_photo = CRisOrFall()
self.index = 1
self.configReader.read(Constant.set_ini)
ip = self.configReader.get('Robot_Feed', 'IPAddress')
@ -1035,9 +1037,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.robotClient.time_delay_shake = time_delay_shake
self.configReader = configparser.ConfigParser()
self.configReader.read(Constant.set_ini)
self.configReader.set('Robot_Feed', 'solenoid_valve1_addr', str(take_addr))
self.configReader.set('Robot_Feed', 'solenoid_valve2_addr', str(press_addr))
self.configReader.set('Robot_Feed', 'solenoid_valve3_addr', str(shake_addr))
self.configReader.set('Robot_Feed', 'io_take_addr', str(take_addr))
self.configReader.set('Robot_Feed', 'io_zip_addr', str(press_addr))
self.configReader.set('Robot_Feed', 'io_shake_addr', str(shake_addr))
self.configReader.set('Robot_Feed', 'takeDelay', str(time_delay_take))
self.configReader.set('Robot_Feed', 'putDelay', str(time_delay_put))
self.configReader.set('Robot_Feed', 'shakeDelay', str(time_delay_shake))
@ -1409,6 +1411,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
pass
def updateUI_label_detection(self):
backgroud_img = Util.util_pic.cv2_to_qpixmap(self.feeding.detection_image)
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)
self.label_showDetection.setPixmap(backgroud_img)