From 5944f363f32e42235dea30a0d4baf33929feb9b5 Mon Sep 17 00:00:00 2001 From: Clifford Roche Date: Wed, 27 Apr 2022 15:51:46 -0400 Subject: [PATCH 1/3] No longer require endstop for gear stepper --- Klipper_Files/Extra module/ercf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Klipper_Files/Extra module/ercf.py b/Klipper_Files/Extra module/ercf.py index 62b538f2..c236886f 100644 --- a/Klipper_Files/Extra module/ercf.py +++ b/Klipper_Files/Extra module/ercf.py @@ -119,7 +119,7 @@ def handle_connect(self): if self.gear_stepper is None: raise config.error( "Manual_stepper gear_stepper must be specified") - self.ref_step_dist=self.gear_stepper.rail.steppers[0].get_step_dist() + self.ref_step_dist=self.gear_stepper.steppers[0].get_step_dist() def get_status(self, eventtime): encoder_pos = float(self._counter.get_distance()) @@ -401,7 +401,7 @@ def cmd_ERCF_UNLOAD(self, gcmd): def cmd_ERCF_SET_STEPS(self, gcmd): ratio = gcmd.get_float('RATIO', 1., above=0.) new_step_dist = self.ref_step_dist / ratio - stepper = self.gear_stepper.rail.steppers[0] + stepper = self.gear_stepper.steppers[0] if hasattr(stepper, "set_rotation_distance"): new_rotation_dist = new_step_dist * stepper.get_rotation_distance()[1] stepper.set_rotation_distance(new_rotation_dist) From 14faef0b92be26485c7aa40911a1e9688dfc12dd Mon Sep 17 00:00:00 2001 From: Clifford Roche Date: Wed, 27 Apr 2022 15:53:51 -0400 Subject: [PATCH 2/3] Remove endstop pin definition --- Klipper_Files/ercf_hardware.cfg | 2 -- 1 file changed, 2 deletions(-) diff --git a/Klipper_Files/ercf_hardware.cfg b/Klipper_Files/ercf_hardware.cfg index dc4ba299..2e1d832d 100644 --- a/Klipper_Files/ercf_hardware.cfg +++ b/Klipper_Files/ercf_hardware.cfg @@ -13,8 +13,6 @@ microsteps: 16 # Please do not go higher than 16, this can cause 'MCU Timer too full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree velocity: 35 accel: 150 -#Right now no pin is used for the endstop, but we need to define one for klipper. So just use a random, not used pin -endstop_pin: P0.10 [tmc2209 manual_stepper gear_stepper] # Adapt accordingly to your setup and desires From fbac7c35f714836828d3472ff992c3af88e6ed8e Mon Sep 17 00:00:00 2001 From: Clifford Roche Date: Thu, 28 Apr 2022 09:06:57 -0400 Subject: [PATCH 3/3] Fixing homing --- Klipper_Files/ercf_software.cfg | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Klipper_Files/ercf_software.cfg b/Klipper_Files/ercf_software.cfg index 4aa23a30..d0ee5cd7 100644 --- a/Klipper_Files/ercf_software.cfg +++ b/Klipper_Files/ercf_software.cfg @@ -815,9 +815,7 @@ gcode: {% if printer["gcode_macro _ERCF_PAUSE"].is_paused|int == 0 %} {% set selector_homed = 0 %} {% if printer["gcode_macro _ERCF_VAR"].sensorless_selector|int == 1 %} - {% if printer.query_endstops.last_query["manual_stepper gear_stepper"] == 1 %} - {% set selector_homed = 1 %} - {% endif %} + {% set selector_homed = 1 %} {% else %} {% if printer.query_endstops.last_query["manual_stepper selector_stepper"] == 1 %} {% set selector_homed = 1 %}