@@ -212,9 +212,10 @@ def wait_until_idle(self) -> None:
212212 def _command_and_validate (self , command : bytes , expected : bytes ) -> None :
213213 with self ._lock :
214214 answer = self .get_command (command )
215+ if answer == b':A \n ' :
215216 #wait for move to stop
216- while (self .get_command (b'STATUS' ) != expected ):
217- time .sleep (0.1 )
217+ while (self .get_command (b'STATUS' ) != expected ):
218+ time .sleep (0.01 )
218219 return answer
219220
220221 def get_command (self , command : bytes ) -> bytes :
@@ -228,8 +229,12 @@ def move_command(self, command: bytes) -> None:
228229 # Movement commands respond with ":A \n" but the move is then
229230 # being performed. The move is only finihsed once the
230231 # "STATUS" command returns "N" rather than "B"
231- self ._command_and_validate (command , b"N" )
232-
232+ #self._command_and_validate(command, b"N")
233+ #
234+ #actully beter to just issue the move command and rely on
235+ #other process to check position
236+ self .get_command (command )
237+
233238 def move_by_relative_position (self , axis : bytes , delta : float ) -> None :
234239 """Send a realtive movement command to stated axis"""
235240 axisname = AXIS_MAPPER [axis ]
@@ -335,6 +340,7 @@ def move_by(self, delta: typing.Mapping[str, float]) -> None:
335340
336341 def move_to (self , position : typing .Mapping [str , float ]) -> None :
337342 """Move specified axes by the specified distance. """
343+ print (position )
338344 for axis_name , axis_position in position .items ():
339345 self ._dev_conn .move_to_absolute_position (
340346 int (axis_name ), int (axis_position ),
0 commit comments