trapq: Remove move_fill()

Now that all callers use the trapq system to queue moves, it is no
longer necessary to individually allocate and fill a 'struct move'.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-10-29 12:44:39 -04:00
parent 797dcfcb12
commit 1acaaa98c2
9 changed files with 49 additions and 57 deletions

View file

@ -22,19 +22,18 @@ struct move {
struct list_node node;
};
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);
struct trapq {
struct list_head moves;
};
struct move *move_alloc(void);
void trapq_append(struct trapq *tq, 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);
struct trapq *trapq_alloc(void);
void trapq_free(struct trapq *tq);
void trapq_add_move(struct trapq *tq, struct move *m);