2018-06-09 01:55:24 +02:00
|
|
|
#ifndef ITERSOLVE_H
|
|
|
|
#define ITERSOLVE_H
|
|
|
|
|
2019-10-27 18:23:03 +01:00
|
|
|
#include <stdint.h> // int32_t
|
2018-06-09 01:55:24 +02:00
|
|
|
|
|
|
|
struct stepper_kinematics;
|
2019-10-27 18:23:03 +01:00
|
|
|
struct move;
|
2019-10-27 16:06:46 +01:00
|
|
|
typedef double (*sk_calc_callback)(struct stepper_kinematics *sk, struct move *m
|
|
|
|
, double move_time);
|
2019-10-27 16:14:40 +01:00
|
|
|
typedef void (*sk_post_callback)(struct stepper_kinematics *sk);
|
2018-06-09 01:55:24 +02:00
|
|
|
struct stepper_kinematics {
|
|
|
|
double step_dist, commanded_pos;
|
|
|
|
struct stepcompress *sc;
|
2019-10-27 16:06:46 +01:00
|
|
|
sk_calc_callback calc_position_cb;
|
2019-10-27 16:14:40 +01:00
|
|
|
sk_post_callback post_cb;
|
2018-06-09 01:55:24 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
int32_t itersolve_gen_steps(struct stepper_kinematics *sk, struct move *m);
|
|
|
|
void itersolve_set_stepcompress(struct stepper_kinematics *sk
|
|
|
|
, struct stepcompress *sc, double step_dist);
|
2018-07-18 17:51:28 +02:00
|
|
|
double itersolve_calc_position_from_coord(struct stepper_kinematics *sk
|
|
|
|
, double x, double y, double z);
|
2018-06-09 01:55:24 +02:00
|
|
|
void itersolve_set_commanded_pos(struct stepper_kinematics *sk, double pos);
|
2018-06-22 19:03:07 +02:00
|
|
|
double itersolve_get_commanded_pos(struct stepper_kinematics *sk);
|
2018-06-09 01:55:24 +02:00
|
|
|
|
|
|
|
#endif // itersolve.h
|