删除所有外部旧引用
This commit is contained in:
@@ -13,7 +13,8 @@ import ttkbootstrap as ttk
|
||||
from PIL import Image, ImageTk
|
||||
|
||||
from app.services import ai_image as _svc
|
||||
from drivers.ucd_helpers import get_current_resolution
|
||||
|
||||
|
||||
|
||||
|
||||
# ---------------- 面板创建 ----------------
|
||||
@@ -638,7 +639,7 @@ def _send_to_ucd(self):
|
||||
|
||||
# 发送前检查分辨率:建议与当前 UCD 输出分辨率一致。
|
||||
try:
|
||||
target_w, target_h = get_current_resolution(ucd)
|
||||
target_w, target_h = self.signal_service.current_resolution()
|
||||
except Exception:
|
||||
target_w, target_h = 3840, 2160
|
||||
try:
|
||||
|
||||
@@ -310,10 +310,8 @@ def _run_custom_row_single_step(self, item_id, row_no):
|
||||
self._dispatch_ui(self.status_var.set, "单步测试失败:行号超范围")
|
||||
return
|
||||
|
||||
self.ucd.set_ucd_params(temp_config)
|
||||
pattern_param = converted_params[row_no - 1]
|
||||
self.ucd.set_pattern(self.ucd.current_pattern, pattern_param)
|
||||
self.ucd.run()
|
||||
self.signal_service.apply_and_run(temp_config, pattern_param)
|
||||
|
||||
time.sleep(self.pattern_settle_time)
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ def _start_pantone_baseline(self):
|
||||
if self._pantone_running:
|
||||
messagebox.showinfo("提示", "Pantone 任务正在执行")
|
||||
return
|
||||
if not getattr(self, "ucd", None) or not self.ucd.status:
|
||||
if not self.signal_service.is_connected:
|
||||
messagebox.showwarning("警告", "请先连接 UCD323")
|
||||
return
|
||||
if not getattr(self, "ca", None):
|
||||
@@ -254,7 +254,7 @@ def _resume_pantone_baseline(self):
|
||||
if not self._pantone_paused:
|
||||
messagebox.showinfo("提示", "当前没有可继续的暂停任务")
|
||||
return
|
||||
if not getattr(self, "ucd", None) or not self.ucd.status:
|
||||
if not self.signal_service.is_connected:
|
||||
messagebox.showwarning("警告", "请先连接 UCD323")
|
||||
return
|
||||
if not getattr(self, "ca", None):
|
||||
|
||||
@@ -13,7 +13,8 @@ from tkinter import filedialog, messagebox
|
||||
import ttkbootstrap as ttk
|
||||
from PIL import Image
|
||||
|
||||
from drivers.ucd_helpers import get_current_resolution
|
||||
|
||||
|
||||
|
||||
|
||||
_DEFAULT_SAMPLES = [
|
||||
@@ -387,9 +388,9 @@ def _format_float(value):
|
||||
|
||||
|
||||
def _build_color_patch(self, hex_value):
|
||||
if not getattr(self, "ucd", None) or not self.ucd.status:
|
||||
if not self.signal_service.is_connected:
|
||||
raise RuntimeError("请先连接 UCD323 设备")
|
||||
width, height = get_current_resolution(self.ucd)
|
||||
width, height = self.signal_service.current_resolution()
|
||||
rgb = tuple(int(hex_value[i:i + 2], 16) for i in (1, 3, 5))
|
||||
temp_dir = os.path.join(tempfile.gettempdir(), "pq_single_step_patches")
|
||||
os.makedirs(temp_dir, exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user