aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/toolhead.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-09-15 12:20:49 -0400
committerKevin O'Connor <kevin@koconnor.net>2016-11-14 12:35:36 -0500
commit941427554a23dd0ae963eb9df7d2724c7c90809b (patch)
treeda98961e87b008d7cda3e1e5a4b8d37806f3ea5e /klippy/toolhead.py
parent7554c7f69423bf3d22f340a8b4851c25de855983 (diff)
downloadkutter-941427554a23dd0ae963eb9df7d2724c7c90809b.tar.gz
kutter-941427554a23dd0ae963eb9df7d2724c7c90809b.tar.xz
kutter-941427554a23dd0ae963eb9df7d2724c7c90809b.zip
delta: Initial support for linear delta kinematics
This adds support for delta based robots. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/toolhead.py')
-rw-r--r--klippy/toolhead.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/klippy/toolhead.py b/klippy/toolhead.py
index d57a22e5..91843805 100644
--- a/klippy/toolhead.py
+++ b/klippy/toolhead.py
@@ -4,7 +4,7 @@
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import math, logging, time
-import cartesian
+import cartesian, delta
EXTRUDE_DIFF_IGNORE = 1.02
@@ -159,7 +159,10 @@ class ToolHead:
self.printer = printer
self.reactor = printer.reactor
self.extruder = printer.objects.get('extruder')
- self.kin = cartesian.CartKinematics(printer, config)
+ kintypes = {'cartesian': cartesian.CartKinematics,
+ 'delta': delta.DeltaKinematics}
+ kin = config.get('kinematics', 'cartesian')
+ self.kin = kintypes[kin](printer, config)
self.max_speed, self.max_accel = self.kin.get_max_speed()
self.junction_deviation = config.getfloat('junction_deviation', 0.02)
self.move_queue = MoveQueue()