trapq: Add trapq_find_move() function

Add support for finding a move by time in the trapezoidal velocity
move list.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2019-11-04 18:48:51 -05:00
parent a28b29993a
commit da06e185fb
2 changed files with 22 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ void trapq_append(struct trapq *tq, double print_time
double move_get_distance(struct move *m, double move_time);
struct coord move_get_coord(struct move *m, double move_time);
double trapq_integrate(struct move *m, int axis, double start, double end);
struct move *trapq_find_move(struct move *m, double *ptime);
struct trapq *trapq_alloc(void);
void trapq_free(struct trapq *tq);
void trapq_check_sentinels(struct trapq *tq);