trapq: Use separate 'move' entries for accel, cruise, and decel phases

Only track a single acceleration movement in a 'struct move' instance.
Break the classic trapezoid movement (accel, cruise, decel) into three
separate movements.  This simplifies the calculation logic.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2019-11-05 15:42:19 -05:00
parent 7ca86f1723
commit 076a66f791
5 changed files with 86 additions and 71 deletions

View File

@@ -7,16 +7,9 @@ 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;
double start_v, half_accel;
struct coord start_pos, axes_r;
struct list_node node;