From af99ab164543bc5e1ee68ef35b1b6f42f06ca887 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 10 Jul 2016 12:23:35 -0400 Subject: extruder: Create a new class and python file to track the printer extruder Create a new python file (extruder.py) to control the extruder heater and stepper motors. This separates the extruder control logic from the cartesian robot code - making it easier to customize both the kinematic control of the robot as well as the extruder. Signed-off-by: Kevin O'Connor --- klippy/cartesian.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'klippy/cartesian.py') diff --git a/klippy/cartesian.py b/klippy/cartesian.py index 100ce220..b2bc1b43 100644 --- a/klippy/cartesian.py +++ b/klippy/cartesian.py @@ -6,14 +6,14 @@ import logging import stepper, homing -StepList = (0, 1, 2, 3) +StepList = (0, 1, 2) class CartKinematics: def __init__(self, printer, config): - steppers = ['stepper_x', 'stepper_y', 'stepper_z', 'stepper_e'] + steppers = ['stepper_x', 'stepper_y', 'stepper_z'] self.steppers = [stepper.PrinterStepper(printer, config.getsection(n)) for n in steppers] - self.stepper_pos = [0, 0, 0, 0] + self.stepper_pos = [0, 0, 0] def build_config(self): for stepper in self.steppers: stepper.build_config() @@ -31,9 +31,6 @@ class CartKinematics: accel_factor = min([self.steppers[i].max_accel / abs(axes_d[i]) for i in StepList if axes_d[i]]) return velocity_factor * move_d, accel_factor * move_d - def get_max_e_speed(self): - s = self.steppers[3] - return s.max_velocity, s.max_accel def home(self, toolhead, axis): # Each axis is homed independently and in order homing_state = homing.Homing(toolhead, self.steppers) # XXX -- cgit v1.2.3-70-g09d2