mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2025-12-19 05:51:17 +00:00
Merge branch '37-biomek-i5i7' of https://github.com/dptech-corp/Uni-Lab-OS into 37-biomek-i5i7
This commit is contained in:
@@ -23,8 +23,8 @@ class LiquidHandlerBiomek(LiquidHandlerAbstract):
|
|||||||
该类用于处理Biomek液体处理器的特定操作。
|
该类用于处理Biomek液体处理器的特定操作。
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, backend=None, deck=None, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(backend, deck, *args, **kwargs)
|
||||||
self._status = "Idle" # 初始状态为 Idle
|
self._status = "Idle" # 初始状态为 Idle
|
||||||
self._success = False # 初始成功状态为 False
|
self._success = False # 初始成功状态为 False
|
||||||
self._status_queue = kwargs.get("status_queue", None) # 状态队列
|
self._status_queue = kwargs.get("status_queue", None) # 状态队列
|
||||||
@@ -421,7 +421,6 @@ class LiquidHandlerBiomek(LiquidHandlerAbstract):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
steps_info = '''
|
steps_info = '''
|
||||||
{
|
{
|
||||||
"steps": [
|
"steps": [
|
||||||
|
|||||||
@@ -340,6 +340,21 @@ liquid_handler.biomek:
|
|||||||
none_keys: none_keys
|
none_keys: none_keys
|
||||||
feedback: {}
|
feedback: {}
|
||||||
result: {}
|
result: {}
|
||||||
|
handles:
|
||||||
|
input:
|
||||||
|
- handler_key: liquid-input
|
||||||
|
label: Liquid Input
|
||||||
|
data_type: resource
|
||||||
|
io_type: target
|
||||||
|
data_source: handle
|
||||||
|
data_key: liquid
|
||||||
|
output:
|
||||||
|
- handler_key: liquid-output
|
||||||
|
label: Liquid Output
|
||||||
|
data_type: resource
|
||||||
|
io_type: source
|
||||||
|
data_source: executor
|
||||||
|
data_key: liquid
|
||||||
transfer_biomek:
|
transfer_biomek:
|
||||||
type: LiquidHandlerTransferBiomek
|
type: LiquidHandlerTransferBiomek
|
||||||
goal:
|
goal:
|
||||||
@@ -351,6 +366,21 @@ liquid_handler.biomek:
|
|||||||
dispense_techniques: dispense_techniques
|
dispense_techniques: dispense_techniques
|
||||||
feedback: {}
|
feedback: {}
|
||||||
result: {}
|
result: {}
|
||||||
|
handles:
|
||||||
|
input:
|
||||||
|
- handler_key: liquid-input
|
||||||
|
label: Liquid Input
|
||||||
|
data_type: resource
|
||||||
|
io_type: target
|
||||||
|
data_source: handle
|
||||||
|
data_key: liquid
|
||||||
|
output:
|
||||||
|
- handler_key: liquid-output
|
||||||
|
label: Liquid Output
|
||||||
|
data_type: resource
|
||||||
|
io_type: source
|
||||||
|
data_source: executor
|
||||||
|
data_key: liquid
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties: {}
|
properties: {}
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ class Registry:
|
|||||||
"goal_default": yaml.safe_load(
|
"goal_default": yaml.safe_load(
|
||||||
io.StringIO(get_yaml_from_goal_type(self.ResourceCreateFromOuter.Goal))
|
io.StringIO(get_yaml_from_goal_type(self.ResourceCreateFromOuter.Goal))
|
||||||
),
|
),
|
||||||
|
"handles": {},
|
||||||
},
|
},
|
||||||
"create_resource": {
|
"create_resource": {
|
||||||
"type": self.ResourceCreateFromOuterEasy,
|
"type": self.ResourceCreateFromOuterEasy,
|
||||||
@@ -84,6 +85,7 @@ class Registry:
|
|||||||
"goal_default": yaml.safe_load(
|
"goal_default": yaml.safe_load(
|
||||||
io.StringIO(get_yaml_from_goal_type(self.ResourceCreateFromOuterEasy.Goal))
|
io.StringIO(get_yaml_from_goal_type(self.ResourceCreateFromOuterEasy.Goal))
|
||||||
),
|
),
|
||||||
|
"handles": {},
|
||||||
},
|
},
|
||||||
"test_latency": {
|
"test_latency": {
|
||||||
"type": self.EmptyIn,
|
"type": self.EmptyIn,
|
||||||
@@ -92,6 +94,7 @@ class Registry:
|
|||||||
"result": {"latency_ms": "latency_ms", "time_diff_ms": "time_diff_ms"},
|
"result": {"latency_ms": "latency_ms", "time_diff_ms": "time_diff_ms"},
|
||||||
"schema": ros_action_to_json_schema(self.EmptyIn),
|
"schema": ros_action_to_json_schema(self.EmptyIn),
|
||||||
"goal_default": {},
|
"goal_default": {},
|
||||||
|
"handles": {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -214,6 +217,8 @@ class Registry:
|
|||||||
# 处理动作值映射
|
# 处理动作值映射
|
||||||
if "action_value_mappings" in device_config["class"]:
|
if "action_value_mappings" in device_config["class"]:
|
||||||
for action_name, action_config in device_config["class"]["action_value_mappings"].items():
|
for action_name, action_config in device_config["class"]["action_value_mappings"].items():
|
||||||
|
if "handles" not in action_config:
|
||||||
|
action_config["handles"] = []
|
||||||
if "type" in action_config:
|
if "type" in action_config:
|
||||||
action_config["type"] = self._replace_type_with_class(
|
action_config["type"] = self._replace_type_with_class(
|
||||||
action_config["type"], device_id, f"动作 {action_name}"
|
action_config["type"], device_id, f"动作 {action_name}"
|
||||||
|
|||||||
Reference in New Issue
Block a user