Commit 1472aced authored by Matias Guijarro's avatar Matias Guijarro
Browse files

home move user message: do not display possibly wrong direction

The real home move direction may depend on the configured home
source -  it can be 1 or -1 (positive or negative direction),
but it can also be Lim+ or Lim- or even 0 (hardware decides).
So, it is better to not display something wrong here.
parent c4100c84
Pipeline #37784 passed with stages
in 99 minutes and 17 seconds
......@@ -1958,9 +1958,7 @@ class Axis:
raise RuntimeError("axis %s state is %r" % (self.name, "MOVING"))
# create motion object for hooks
motion = Motion(
self, switch, None, "homing", user_target_pos=f"home switch: {switch}"
)
motion = Motion(self, switch, None, "homing", user_target_pos=f"home")
motion.polling_time = (
self._polling_time if polling_time is None else polling_time
)
......
......@@ -989,10 +989,10 @@ def test_user_msg(roby):
assert str(user_msg.value) == "Moving roby from 0 to lim-"
with pytest.raises(CancelMove) as user_msg:
roby.home(1)
assert str(user_msg.value) == "Moving roby from 0 to home switch: 1"
assert str(user_msg.value) == "Moving roby from 0 to home"
with pytest.raises(CancelMove) as user_msg:
roby.home(-1)
assert str(user_msg.value) == "Moving roby from 0 to home switch: -1"
assert str(user_msg.value) == "Moving roby from 0 to home"
with pytest.raises(CancelMove) as user_msg:
roby.jog(10)
assert (
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment