diff --git a/pystages/cncrouter.py b/pystages/cncrouter.py index 8758af0..c110764 100644 --- a/pystages/cncrouter.py +++ b/pystages/cncrouter.py @@ -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) @@ -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 @@ -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() @@ -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: @@ -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 diff --git a/pystages/smc100.py b/pystages/smc100.py index 32f965e..863eee3 100644 --- a/pystages/smc100.py +++ b/pystages/smc100.py @@ -280,7 +280,7 @@ def position(self, value: Vector): def home(self): """ - Perform home search. + Perform home search, without blocking. """ self.home_search() @@ -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: @@ -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)