Almost done trapezioidal model
This commit is contained in:
@@ -35,14 +35,11 @@ typedef enum{
|
||||
|
||||
typedef enum{
|
||||
ST_STOP, // stopped
|
||||
ST_ACC, // accelerated
|
||||
ST_CONSTSPEED, // moving with constant speed
|
||||
ST_DEC, // decelerated
|
||||
ST_ERROR, // some error -> stop
|
||||
ST_MOVE, // moving
|
||||
ST_AMOUNT
|
||||
} movestate_t;
|
||||
|
||||
typedef struct{
|
||||
typedef struct{ // all values could be both as positive and negative
|
||||
double coord;
|
||||
double speed;
|
||||
double accel;
|
||||
@@ -59,10 +56,13 @@ typedef struct{
|
||||
int (*calculate)(moveparam_t *target, double t); // calculate stages of traectory beginning from t
|
||||
movestate_t (*proc_move)(moveparam_t *next, double t); // calculate next model point for time t
|
||||
movestate_t (*get_state)(moveparam_t *cur); // get current moving state
|
||||
void (*stop)(); // stop by ramp
|
||||
void (*emergency_stop); // stop with highest acceleration
|
||||
void (*stop)(double t); // stop by ramp
|
||||
void (*emergency_stop)(double t); // stop with highest acceleration
|
||||
double (*stoppedtime)(); // time when moving will ends
|
||||
} movemodel_t;
|
||||
|
||||
extern double coord_tolerance;
|
||||
|
||||
double nanot();
|
||||
movemodel_t *init_moving(ramptype_t type, limits_t *l);
|
||||
int init_coordtol(double tolerance);
|
||||
|
||||
Reference in New Issue
Block a user