1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #ifndef _ramp_H_
- #define _ramp_H_
- #include <fruit.h>
- #ifndef RAMP_UINCPOW
- #define RAMP_UINCPOW 10
- #endif
- #ifndef RAMP_MAXERROR
- #define RAMP_MAXERROR 3
- #endif
- typedef struct {
- int destPos;
- long int currentPos;
- int maxSpeed;
- long int speed;
- int maxAccel ;
-
-
-
-
-
- int maxDecel ;
- } t_ramp ;
- void rampInit(t_ramp *Ramp);
- void rampGoto(t_ramp *Ramp,int pos);
- void rampSetPos(t_ramp *Ramp,int pos);
- #define rampGetPos(Ramp) ((Ramp)->currentPos>>(RAMP_UINCPOW))
- void rampCompute(t_ramp *Ramp);
- void rampInput(t_ramp *Ramp);
- void rampDeclareEE(t_ramp *Ramp);
- #define RAMP_EESIZE 6
- #endif
|