aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/chelper/trapq.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-10-27 13:23:03 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-11-06 15:51:51 -0500
commitfdbdb3c70777e6c953b13d5455ccab56d024b029 (patch)
tree4e5240b3ad9474917aaf2ef9a5ea4ed0c996f2e8 /klippy/chelper/trapq.h
parent374eb9876565272c041e1d6950e7547d0604dffa (diff)
downloadkutter-fdbdb3c70777e6c953b13d5455ccab56d024b029.tar.gz
kutter-fdbdb3c70777e6c953b13d5455ccab56d024b029.tar.xz
kutter-fdbdb3c70777e6c953b13d5455ccab56d024b029.zip
trapq: Add new trapq.c file with code for trapezoidal velocity handling
Move the "struct move" code from itersolve.c to new file trapq.c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/chelper/trapq.h')
-rw-r--r--klippy/chelper/trapq.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/klippy/chelper/trapq.h b/klippy/chelper/trapq.h
new file mode 100644
index 00000000..15d7b44c
--- /dev/null
+++ b/klippy/chelper/trapq.h
@@ -0,0 +1,30 @@
+#ifndef TRAPQ_H
+#define TRAPQ_H
+
+struct coord {
+ double x, y, z;
+};
+
+struct move_accel {
+ double c1, c2;
+};
+
+struct move {
+ double print_time, move_t;
+ double accel_t, cruise_t;
+ double cruise_start_d, decel_start_d;
+ double cruise_v;
+ struct move_accel accel, decel;
+ struct coord start_pos, axes_r;
+};
+
+struct move *move_alloc(void);
+void move_fill(struct move *m, double print_time
+ , double accel_t, double cruise_t, double decel_t
+ , double start_pos_x, double start_pos_y, double start_pos_z
+ , double axes_d_x, double axes_d_y, double axes_d_z
+ , double start_v, double cruise_v, double accel);
+double move_get_distance(struct move *m, double move_time);
+struct coord move_get_coord(struct move *m, double move_time);
+
+#endif // trapq.h