diff --git a/hardware-testing/hardware_testing/modules/flex_stacker_evt_qc/driver.py b/hardware-testing/hardware_testing/modules/flex_stacker_evt_qc/driver.py index 57d8dab2335..d55ffc13ceb 100644 --- a/hardware-testing/hardware_testing/modules/flex_stacker_evt_qc/driver.py +++ b/hardware-testing/hardware_testing/modules/flex_stacker_evt_qc/driver.py @@ -119,11 +119,15 @@ def __init__(self, port: str, simulating: bool = False) -> None: if not self._simulating: self._serial = serial.Serial(port, baudrate=STACKER_FREQ, timeout=60) - def _send_and_recv(self, msg: str, guard_ret: str = "") -> str: + def _send_and_recv( + self, msg: str, guard_ret: str = "", response_required=True + ) -> str: """Internal utility to send a command and receive the response.""" assert not self._simulating self._serial.reset_input_buffer() self._serial.write(msg.encode()) + if not response_required: + return "OK\n" ret = self._serial.readline() if guard_ret: if not ret.startswith(guard_ret.encode()): @@ -160,7 +164,7 @@ def stop_motor(self) -> None: """Stop motor movement.""" if self._simulating: return - self._send_and_recv("M0\n") + self._send_and_recv("M0\n", response_required=False) def get_limit_switch(self, axis: StackerAxis, direction: Direction) -> bool: """Get limit switch status.