aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/chelper/kin_cartesian.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-10-28 22:45:02 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-11-06 15:51:51 -0500
commit7afac2b3afb519e742e33dca62db5d9657f10ee0 (patch)
tree11bf67aeec06b862def14f262944cabe66cf25d7 /klippy/chelper/kin_cartesian.c
parentf3ef9c18899e06eb66301fe8c994bcc67955905b (diff)
downloadkutter-7afac2b3afb519e742e33dca62db5d9657f10ee0.tar.gz
kutter-7afac2b3afb519e742e33dca62db5d9657f10ee0.tar.xz
kutter-7afac2b3afb519e742e33dca62db5d9657f10ee0.zip
cartesian: Convert step generation to use trapq system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/chelper/kin_cartesian.c')
-rw-r--r--klippy/chelper/kin_cartesian.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/klippy/chelper/kin_cartesian.c b/klippy/chelper/kin_cartesian.c
index 4ae89e38..86569d4a 100644
--- a/klippy/chelper/kin_cartesian.c
+++ b/klippy/chelper/kin_cartesian.c
@@ -1,6 +1,6 @@
// Cartesian kinematics stepper pulse time generation
//
-// Copyright (C) 2018 Kevin O'Connor <kevin@koconnor.net>
+// Copyright (C) 2018-2019 Kevin O'Connor <kevin@koconnor.net>
//
// This file may be distributed under the terms of the GNU GPLv3 license.
@@ -37,11 +37,15 @@ cartesian_stepper_alloc(char axis)
{
struct stepper_kinematics *sk = malloc(sizeof(*sk));
memset(sk, 0, sizeof(*sk));
- if (axis == 'x')
+ if (axis == 'x') {
sk->calc_position_cb = cart_stepper_x_calc_position;
- else if (axis == 'y')
+ sk->active_flags = AF_X;
+ } else if (axis == 'y') {
sk->calc_position_cb = cart_stepper_y_calc_position;
- else if (axis == 'z')
+ sk->active_flags = AF_Y;
+ } else if (axis == 'z') {
sk->calc_position_cb = cart_stepper_z_calc_position;
+ sk->active_flags = AF_Z;
+ }
return sk;
}