修改部分UI、修改module中心点设定、添加单独连接

This commit is contained in:
xinzhu.yin
2026-06-08 11:03:10 +08:00
parent e9a591bf6e
commit febbb28a4c
8 changed files with 201 additions and 24 deletions

View File

@@ -83,6 +83,15 @@ def plot_cct(self: "PQAutomationApp", test_type):
self.log_gui.log(f" y范围: {min(y_measured):.6f} - {max(y_measured):.6f}", level="info")
# ========== 根据测试类型读取对应参数 ==========
# 屏模组中心坐标优先使用实测 100% 灰阶点gray 数据第 1 个点)
screen_center_xy = None
if test_type == "screen_module":
try:
if gray_data and len(gray_data[0]) >= 2:
screen_center_xy = (float(gray_data[0][0]), float(gray_data[0][1]))
except Exception:
screen_center_xy = None
if test_type == "sdr_movie":
try:
x_ideal = float(self.sdr_cct_x_ideal_var.get())
@@ -111,11 +120,23 @@ def plot_cct(self: "PQAutomationApp", test_type):
self.log_gui.log("HDR 参数读取失败,使用默认值", level="error")
else: # screen_module
try:
x_ideal = float(self.cct_x_ideal_var.get())
x_tolerance = float(self.cct_x_tolerance_var.get())
y_ideal = float(self.cct_y_ideal_var.get())
y_tolerance = float(self.cct_y_tolerance_var.get())
self.log_gui.log("使用屏模组色度参数", level="success")
if screen_center_xy is not None:
x_ideal, y_ideal = screen_center_xy
# 同步到输入框,避免界面显示和实际计算不一致
try:
self.cct_x_ideal_var.set(f"{x_ideal:.6f}")
self.cct_y_ideal_var.set(f"{y_ideal:.6f}")
except Exception:
pass
self.log_gui.log(
f"屏模组中心使用实测100%坐标: x={x_ideal:.6f}, y={y_ideal:.6f}"
, level="success")
else:
x_ideal = float(self.cct_x_ideal_var.get())
y_ideal = float(self.cct_y_ideal_var.get())
self.log_gui.log("未取到实测100%点,回退到屏模组色度参数", level="error")
except:
x_ideal = 0.306
x_tolerance = 0.003