Commit c362aa9e authored by Cyril Guilloud's avatar Cyril Guilloud

add help messages for 'jog'.

parent 2d2e226f
Pipeline #21197 passed with stages
in 42 minutes and 4 seconds
......@@ -361,7 +361,12 @@ class Motion:
def user_msg(self):
start_ = rounder(self.axis.tolerance, self.axis.position)
if self.type == "jog":
return f"Moving {self.axis.name} from {start_} until it is stopped, at constant velocity: {self.target_pos}"
msg = (
f"Moving {self.axis.name} from {start_} until it is stopped, at constant velocity: {self.target_pos}\n"
f"To stop it: {self.axis.name}.stop()"
)
return msg
else:
if self.user_target_pos is None:
return None
......@@ -1448,6 +1453,7 @@ class Axis:
def stop_one(controller, motions):
controller.stop_jog(motions[0].axis)
lprint(f"Motor {self.name} stopped at posision: {self.position}")
self._group_move = GroupMove()
self._group_move.move(
......
......@@ -819,5 +819,6 @@ def test_user_msg(roby):
roby.jog(10)
assert (
str(user_msg.value)
== "Moving roby from 0 until it is stopped, at constant velocity: 10.0"
== f"Moving roby from 0 until it is stopped, at constant velocity: 10.0\n"
f"To stop it: roby.stop()"
)
Markdown is supported
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