Skip to content

Commit

Permalink
add serial.flush before sending command
Browse files Browse the repository at this point in the history
  • Loading branch information
vegano1 committed Nov 27, 2024
1 parent 2c45c59 commit 92a823c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def __init__(self, port: str, simulating: bool = False) -> None:
def _send_and_recv(self, msg: str, guard_ret: str = "") -> str:
"""Internal utility to send a command and receive the response."""
assert not self._simulating
self._serial.flush()
self._serial.write(msg.encode())
ret = self._serial.readline()
if guard_ret:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Test E-Stop."""

from time import sleep

from typing import List, Union
from hardware_testing.data import ui
from hardware_testing.data.csv_report import (
Expand Down Expand Up @@ -48,8 +48,6 @@ def run(driver: FlexStacker, report: CSVReport, section: str) -> None:
ui.print_header("Trigger E-Stop")
if not driver._simulating:
ui.get_user_ready("Trigger the E-Stop")
# wait a bit before requesting e-stop state
sleep(2)

if not driver.get_estop():
print("E-Stop is not triggered")
Expand Down

0 comments on commit 92a823c

Please sign in to comment.