PID seems like almost working, but I have a great problem with model!
This commit is contained in:
@@ -37,7 +37,10 @@ static void chkminmax(double *min, double *max){
|
||||
movemodel_t *model_init(limits_t *l){
|
||||
if(!l) return FALSE;
|
||||
movemodel_t *m = calloc(1, sizeof(movemodel_t));
|
||||
// we can't use memcpy or assign as Times/Params would be common for all
|
||||
*m = trapez;
|
||||
m->Times = calloc(STAGE_AMOUNT, sizeof(double));
|
||||
m->Params = calloc(STAGE_AMOUNT, sizeof(moveparam_t));
|
||||
moveparam_t *max = &l->max, *min = &l->min;
|
||||
if(min->speed < 0.) min->speed = -min->speed;
|
||||
if(max->speed < 0.) max->speed = -max->speed;
|
||||
|
||||
Reference in New Issue
Block a user