Skip to content

Commit ddb7d32

Browse files
committed
STARChatterboxBackend less verbose
1 parent ab6e209 commit ddb7d32

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

pylabrobot/liquid_handling/backends/hamilton/STAR_chatterbox.py

+23-6
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,22 @@ def __init__(self, num_channels: int = 8):
1414
self._iswap_parked = True
1515

1616
async def setup(self, skip_autoload=False, skip_iswap=False, skip_core96_head=False) -> None:
17-
LiquidHandlerBackend.setup(self)
17+
await LiquidHandlerBackend.setup(self)
1818

1919
async def request_tip_presence(self):
2020
return list(range(self.num_channels))
2121

2222
async def request_machine_configuration(self):
23-
# configuration is directly copied from a STARlet w/ 8p, iswap, and autoload
24-
self.conf = {"kb": 11, "kp": 8, "id": 2}
23+
# configuration byte `kb` is directly copied from a STARlet w/ 8p, iswap, and autoload
24+
# Bit 0: PIP Type 0 = 300ul 1 = 1000ul
25+
# Bit 1: ISWAP 0 = none 1 = installed
26+
# Bit 2: Main front cover monitoring 0 = none 1 = installed
27+
# Bit 3: Auto load 0 = none 1 = installed
28+
# Bit 4: Wash station 1 0 = none 1 = installed
29+
# Bit 5: Wash station 2 0 = none 1 = installed
30+
# Bit 6: Temp. controlled carrier 1 0 = none 1 = installed
31+
# Bit 7: Temp. controlled carrier 2 0 = none 1 = installed
32+
self.conf = {"kb": 11, "kp": self.num_channels, "id": 2}
2533
return self.conf
2634

2735
async def request_extended_configuration(self):
@@ -59,8 +67,17 @@ async def request_iswap_initialization_status(self) -> bool:
5967
def iswap_parked(self) -> bool:
6068
return self._iswap_parked is True
6169

62-
async def send_command(self, module, command, *args, **kwargs):
63-
print(f"Sending command: {module}{command} with args {args} and kwargs {kwargs}.")
70+
async def _write_and_read_command(
71+
self,
72+
id_: Optional[int],
73+
cmd: str,
74+
write_timeout: Optional[int] = None,
75+
read_timeout: Optional[int] = None,
76+
wait: bool = True,
77+
) -> Optional[str]:
78+
# print(f"Sending command: {module}{command} with args {args} and kwargs {kwargs}.")
79+
print(cmd)
80+
return None
6481

6582
async def send_raw_command(
6683
self,
@@ -69,5 +86,5 @@ async def send_raw_command(
6986
read_timeout: Optional[int] = None,
7087
wait: bool = True,
7188
) -> Optional[str]:
72-
print(f"Sending raw command: {command}")
89+
print(command)
7390
return None

0 commit comments

Comments
 (0)