toolhead: Move kinematic modules to new kinematics/ directory

Move extruder.py, cartesian.py, corexy.py, and delta.py to a new
kinematics/ sub-directory.  This is intended to make adding new
kinematics a little easier.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-07-12 22:15:45 -04:00
parent 7d897d84d7
commit 8faab46ed2
9 changed files with 37 additions and 17 deletions

View file

@ -4,7 +4,7 @@
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import os, re, logging, collections
import homing, extruder
import homing, kinematics.extruder
class error(Exception):
pass
@ -116,7 +116,7 @@ class GCodeParser:
if self.move_transform is None:
self.move_with_transform = self.toolhead.move
self.position_with_transform = self.toolhead.get_position
extruders = extruder.get_printer_extruders(self.printer)
extruders = kinematics.extruder.get_printer_extruders(self.printer)
if extruders:
self.extruder = extruders[0]
self.toolhead.set_extruder(self.extruder)
@ -396,7 +396,7 @@ class GCodeParser:
self.respond_info('Unknown command:"%s"' % (cmd,))
def cmd_Tn(self, params):
# Select Tool
extruders = extruder.get_printer_extruders(self.printer)
extruders = kinematics.extruder.get_printer_extruders(self.printer)
index = self.get_int('T', params, minval=0, maxval=len(extruders)-1)
e = extruders[index]
if self.extruder is e: