mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-10 15:25:20 -06:00
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>
This commit is contained in:
parent
374eb98765
commit
fdbdb3c707
11 changed files with 142 additions and 126 deletions
30
klippy/chelper/trapq.h
Normal file
30
klippy/chelper/trapq.h
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue