From 157da1759d9a3fc870f72f43fefef7da40ac828b Mon Sep 17 00:00:00 2001 From: Xuwznln <18435084+Xuwznln@users.noreply.github.com> Date: Sun, 29 Jun 2025 11:26:35 +0800 Subject: [PATCH] =?UTF-8?q?status=20types=E5=AF=B9=E4=BA=8E=E5=B5=8C?= =?UTF-8?q?=E5=A5=97=E7=B1=BB=E5=9E=8B=E8=BF=94=E5=9B=9E=E7=9A=84=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=EF=BC=8C=E6=9A=82=E6=97=B6=E5=A4=84=E7=90=86=E6=88=90?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=EF=BC=8C=E6=97=A0=E6=B3=95=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E8=BF=9B=E8=A1=8C=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unilabos/registry/registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unilabos/registry/registry.py b/unilabos/registry/registry.py index 4210c2a..3f4fceb 100644 --- a/unilabos/registry/registry.py +++ b/unilabos/registry/registry.py @@ -314,7 +314,7 @@ class Registry: status_type = "String" # 替换成ROS的String,便于显示 device_config["class"]["status_types"][status_name] = status_type target_type = self._replace_type_with_class(status_type, device_id, f"状态 {status_name}") - if target_type in [dict]: # 对于字典和对象的返回类型,要处理成字符串,直接进行转换 + if target_type in [dict, list]: # 对于嵌套类型返回的对象,暂时处理成字符串,无法直接进行转换 target_type = String status_str_type_mapping[status_type] = target_type device_config["class"]["status_types"] = dict(