From 981c53682f58c49f7c140bad945e54d7d61d2755 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 24 Jul 2017 14:12:17 -0400 Subject: stepper: Use a sane default for homing_positive_dir Use the endstop position to determine a sane default for homing_positive_dir. Signed-off-by: Kevin O'Connor --- config/example.cfg | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'config/example.cfg') diff --git a/config/example.cfg b/config/example.cfg index 36f609c6..71ac0563 100644 --- a/config/example.cfg +++ b/config/example.cfg @@ -35,15 +35,27 @@ step_distance: .0225 endstop_pin: ^ar3 # Endstop switch detection pin. This parameter must be provided for # the X, Y, and Z steppers on cartesian style printers. +#position_min: 0 +# Minimum valid distance (in mm) the user may command the stepper to +# move to. The default is 0mm. +position_endstop: 0 +# Location of the endstop (in mm). This parameter must be provided +# for the X, Y, and Z steppers on cartesian style printers. +position_max: 200 +# Maximum valid distance (in mm) the user may command the stepper to +# move to. This parameter must be provided for the X, Y, and Z +# steppers on cartesian style printers. #homing_speed: 5.0 # Maximum velocity (in mm/s) of the stepper when homing. The default # is 5mm/s. #homing_retract_dist: 5.0 # Distance to backoff (in mm) before homing a second time during # homing. The default is 5mm. -#homing_positive_dir: False -# If true, homes in a positive direction (away from zero). The -# default is False. +#homing_positive_dir: +# If true, homing will cause the stepper to move in a positive +# direction (away from zero); if false, home towards zero. The +# default is true if position_endstop is near position_max and false +# if near position_min. #homing_stepper_phases: 0 # One may optionally set this to the number of phases of the stepper # motor driver (which is the number of micro-steps multiplied by @@ -64,16 +76,6 @@ endstop_pin: ^ar3 # reset. If this is not set, but homing_stepper_phases is set, then # the stepper phase will be detected on the first home and that # phase will be used on all subsequent homes. -#position_min: 0 -# Minimum valid distance (in mm) the user may command the stepper to -# move to. The default is 0mm. -position_endstop: 0 -# Location of the endstop (in mm). This parameter must be provided -# for the X, Y, and Z steppers on cartesian style printers. -position_max: 200 -# Maximum valid distance (in mm) the user may command the stepper to -# move to. This parameter must be provided for the X, Y, and Z -# steppers on cartesian style printers. # The stepper_y section is used to describe the stepper controlling # the Y axis in a cartesian robot. It has the same settings as the -- cgit v1.2.3-70-g09d2