删除所有外部旧引用
This commit is contained in:
@@ -561,10 +561,6 @@ class UCDController:
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
# 向后兼容别名
|
||||
set_sdr_format = apply_signal_format
|
||||
set_hdr_format = apply_signal_format
|
||||
|
||||
def _get_colorimetry_from_color_space(self, color_space, color_format=None):
|
||||
"""将色彩空间字符串转换为UniTAP.ColorInfo.Colorimetry。
|
||||
BT.2020 在 YCbCr 输出时使用 CM_ITUR_BT2020_YCbCr,RGB 输出时使用 CM_ITUR_BT2020_RGB。
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
"""通用 UCD323/UCDController 辅助函数。
|
||||
|
||||
保留为兼容层和薄代理,避免业务模块直接依赖控制器内部实现细节。
|
||||
"""
|
||||
|
||||
|
||||
def get_tx_modules(ucd):
|
||||
"""根据当前接口返回 (pg, ag) 模块。"""
|
||||
return ucd.get_tx_modules()
|
||||
|
||||
|
||||
def get_current_resolution(ucd, default=(3840, 2160)):
|
||||
"""从 UCD 当前 timing 获取 (width, height),失败时返回 default。"""
|
||||
return ucd.get_current_resolution(default)
|
||||
|
||||
|
||||
def send_image_pattern(ucd, image_path):
|
||||
"""通过 UCDController 发送一张本地图片作为显示 Pattern。"""
|
||||
if not getattr(ucd, "status", False):
|
||||
return False
|
||||
|
||||
send_via_controller = getattr(ucd, "send_image_pattern", None)
|
||||
if not callable(send_via_controller):
|
||||
return False
|
||||
return bool(send_via_controller(image_path))
|
||||
|
||||
|
||||
def send_solid_rgb_pattern(ucd, rgb, *, raise_on_error=False):
|
||||
"""通过 UCDController 当前状态发送一组纯色 RGB Pattern。"""
|
||||
if not getattr(ucd, "status", False):
|
||||
if raise_on_error:
|
||||
raise RuntimeError("UCD 未连接,无法发送纯色 Pattern")
|
||||
return False
|
||||
|
||||
send_via_controller = getattr(ucd, "send_solid_rgb_pattern", None)
|
||||
if not callable(send_via_controller):
|
||||
if raise_on_error:
|
||||
raise RuntimeError("UCDController 未实现 send_solid_rgb_pattern")
|
||||
return False
|
||||
|
||||
ok = bool(send_via_controller(list(rgb)))
|
||||
if not ok and raise_on_error:
|
||||
raise RuntimeError(f"发送纯色 Pattern 失败: {rgb}")
|
||||
return ok
|
||||
|
||||
|
||||
Reference in New Issue
Block a user