Skip to content

Commit

Permalink
Code formating
Browse files Browse the repository at this point in the history
  • Loading branch information
mmouchous-ledger committed Nov 13, 2023
1 parent b339aa1 commit 66aa1cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions pystages/cncrouter.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self, dev: str = None, reset_wait_time=2.0):
:param dev: Serial device. For instance `'/dev/ttyUSB0'`.
:param reset_wait_time: Depending on the state of the stage, it can take some time for
GRBL to reset. This parameter makes the wait time to be tuned, by giving a time in seconds.
GRBL to reset. This parameter makes the wait time to be tuned, by giving a time in seconds.
"""

super().__init__(num_axis=3)
Expand All @@ -70,7 +70,7 @@ def reset_grbl(self, wait_time: Optional[float] = None) -> bool:
:return: True if the GRBL sent the correct prompt at the end of the reset
:param wait_time: Depending on the state of the stage, it can take some time for GRBL to
reset. This parameter makes the wait time to be tuned, by giving a time in seconds.
reset. This parameter makes the wait time to be tuned, by giving a time in seconds.
"""
if wait_time is None:
wait_time = self.reset_wait_time
Expand Down Expand Up @@ -165,7 +165,7 @@ def get_current_status(self) -> Optional[Tuple[CNCStatus, dict]]:
router
:return: A tuple containing the status and a dictionary of all other parameters in the
output of the command.
output of the command.
"""
self.send("?", eol="")
status = self.receive()
Expand Down Expand Up @@ -221,7 +221,7 @@ def receive_lines(self, until: str = "ok") -> List[str]:
:param until: The expected response indicating the end of received lines.
:return: The list of all received lines. Note that the expected line is not included in the
list.
list.
"""
lines = []
while (l := self.serial.readline().strip().decode()) != until:
Expand Down Expand Up @@ -291,7 +291,7 @@ def is_moving(self) -> bool:
Queries the current status of the CNC in order to determine if the CNC is moving
:return: True if the CNC reports that a cycle is running (Run) or
if it is in a middle of a homing cycle.
if it is in a middle of a homing cycle.
"""
while (status := self.get_current_status()) is None:
pass
Expand Down
5 changes: 3 additions & 2 deletions pystages/smc100.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def position(self, value: Vector):

def home(self):
"""
Perform home search.
Perform home search, without blocking.
"""
self.home_search()

Expand Down Expand Up @@ -398,6 +398,7 @@ def set_position(self, addr: int, value: float, blocking=True):
def is_moving(self) -> bool:
"""
Indicates if the stage is currently moving due to MOVE, HOME or JOG operation.
:return: Moving state of the stage
"""
for addr in self.addresses:
Expand Down Expand Up @@ -429,7 +430,7 @@ def enter_leave_disable_state(self, addr: Optional[int], enter: bool = True):
DISABLE state makes the motor not energized and opens the control loop.
:param addr: address of the axis to operate.
If None is passed, it applies to all controllers
If None is passed, it applies to all controllers
:param enter: True to enter, False to leave DISABLE state
"""
# MM0 changes the controller’s state from READY to DISABLE (enter)
Expand Down

0 comments on commit 66aa1cb

Please sign in to comment.