台形制御用ライブラリ
Dependents: kisoken_PenPlotter
Diff: trapezoidalMotionCal.h
- Revision:
- 0:a7573f3f2207
diff -r 000000000000 -r a7573f3f2207 trapezoidalMotionCal.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/trapezoidalMotionCal.h Thu Aug 03 06:50:03 2017 +0000 @@ -0,0 +1,41 @@ + +#include "mbed.h" + +#ifndef __TRAPEZOIDAL_MOTION_CAL_H__ +#define __TRAPEZOIDAL_MOTION_CAL_H__ + + +class trapezoidalMotionCal{ + +public: + + trapezoidalMotionCal(double f_start, double f_stop, double f_max, double a_up, double a_down); + + void setTarg(int32_t targ); + + uint32_t calStepDelay(int32_t steps); + +private: + double _f_start; + double _f_stop; + double _f_max; + double _a_up; + double _a_down; + + double step_accel; + double step_decel; + double step_const; + double f_reach; + + int32_t targSteps; + + int shortMode; + int revMode; + +}; + + + + +#endif +