Reverted logging style

This commit is contained in:
Joel Collins 2020-11-12 15:45:58 +00:00
parent e25c23cf1c
commit 6fb61e1e3f
24 changed files with 100 additions and 106 deletions

View file

@ -80,13 +80,13 @@ class MissingStage(BaseStage):
self._position = list(np.array(self._position) + np.array(initial_move))
logging.debug(np.array(self._position) + np.array(initial_move))
logging.debug("New position: {}", self._position)
logging.debug("New position: %s", self._position)
def move_abs(self, final, **kwargs):
time.sleep(0.5)
self._position = list(final)
logging.debug("New position: {}", self._position)
logging.debug("New position: %s", self._position)
def zero_position(self):
"""Set the current position to zero"""

View file

@ -81,7 +81,7 @@ class SangaStage(BaseStage):
@backlash.setter
def backlash(self, blsh):
logging.debug("Setting backlash to {}", (blsh))
logging.debug("Setting backlash to %s", (blsh))
if blsh is None:
self._backlash = None
elif isinstance(blsh, Iterable):
@ -118,7 +118,7 @@ class SangaStage(BaseStage):
backlash: (default: True) whether to correct for backlash.
"""
with self.lock:
logging.debug("Moving sangaboard by {}", displacement)
logging.debug("Moving sangaboard by %s", displacement)
if not backlash or self.backlash is None:
return self.board.move_rel(displacement, axis=axis)
if axis is not None:
@ -158,7 +158,7 @@ class SangaStage(BaseStage):
"""Make an absolute move to a position
"""
with self.lock:
logging.debug("Moving sangaboard to {}", final)
logging.debug("Moving sangaboard to %s", final)
self.board.move_abs(final, **kwargs)
# Settle outside of the stage lock so that another move request
# can just take over before settling
@ -262,7 +262,7 @@ class SangaDeltaStage(SangaStage):
# Transform into delta coordinates
displacement = np.dot(self.Tdv, displacement)
logging.debug("Delta displacement: {}", (displacement))
logging.debug("Delta displacement: %s", (displacement))
# Do the move
SangaStage.move_rel(self, displacement, axis=None, backlash=backlash)
@ -274,7 +274,7 @@ class SangaDeltaStage(SangaStage):
# Transform into delta coordinates
final = np.dot(self.Tdv, final)
logging.debug("Delta final: {}", (final))
logging.debug("Delta final: %s", (final))
# Do the move
SangaStage.move_abs(self, final, **kwargs)