diff options
Diffstat (limited to 'klippy/chelper/trapq.h')
-rw-r--r-- | klippy/chelper/trapq.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/klippy/chelper/trapq.h b/klippy/chelper/trapq.h index 15d7b44c..e568a1ab 100644 --- a/klippy/chelper/trapq.h +++ b/klippy/chelper/trapq.h @@ -1,6 +1,8 @@ #ifndef TRAPQ_H #define TRAPQ_H +#include "list.h" // list_node + struct coord { double x, y, z; }; @@ -16,6 +18,8 @@ struct move { double cruise_v; struct move_accel accel, decel; struct coord start_pos, axes_r; + + struct list_node node; }; struct move *move_alloc(void); @@ -27,4 +31,13 @@ void move_fill(struct move *m, double print_time double move_get_distance(struct move *m, double move_time); struct coord move_get_coord(struct move *m, double move_time); +struct trapq { + struct list_head moves; +}; + +struct trapq *trapq_alloc(void); +void trapq_free(struct trapq *tq); +void trapq_add_move(struct trapq *tq, struct move *m); +void trapq_free_moves(struct trapq *tq, double print_time); + #endif // trapq.h |