速度からステップ数を取得する、台形駆動ライブラリ。
trapezoidalMotionCal.h
- Committer:
- Akito914
- Date:
- 2017-08-03
- Revision:
- 0:a7573f3f2207
File content as of revision 0:a7573f3f2207:
#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