mirror of
git://soft.sys114.com/klipper
synced 2026-02-11 17:40:25 +09:00
trapq: Add code to calculate definitive integral
Support calculating the definitive integral of a cartesian axis position over a time range of the movement queue. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -4,7 +4,12 @@
|
||||
#include "list.h" // list_node
|
||||
|
||||
struct coord {
|
||||
double x, y, z;
|
||||
union {
|
||||
struct {
|
||||
double x, y, z;
|
||||
};
|
||||
double axis[3];
|
||||
};
|
||||
};
|
||||
|
||||
struct move {
|
||||
@@ -27,6 +32,7 @@ void trapq_append(struct trapq *tq, double print_time
|
||||
, 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);
|
||||
double trapq_integrate(struct move *m, int axis, double start, double end);
|
||||
struct trapq *trapq_alloc(void);
|
||||
void trapq_free(struct trapq *tq);
|
||||
void trapq_check_sentinels(struct trapq *tq);
|
||||
|
||||
Reference in New Issue
Block a user