stepper: Introduce stepper_get_position command and remove from endstop.c

Move the logic to calculate and report the stepper's current position
from endstop.c to stepper.c.  This localizes the stepper code into
stepper.c.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-03-05 15:00:15 -05:00
parent 8d6ecd9af8
commit a38437f378
6 changed files with 54 additions and 28 deletions

View file

@ -251,6 +251,12 @@ Stepper commands
so that the next step is relative to the supplied 'clock' time. The
host usually only sends this command at the start of a print.
* stepper_get_position oid=%c : This command causes the firmware to
generate a "stepper_position" response message with the stepper's
current position. The position is the total number of steps
generated with dir=1 minus the total number of steps generated with
dir=0.
* end_stop_home oid=%c clock=%u rest_ticks=%u pin_value=%c : This
command is used during stepper "homing" operations. To use this
command a 'config_end_stop' command with the same 'oid' parameter