速度からステップ数を取得する、台形駆動ライブラリ。
Diff: trapezoidalMotionCal.h
- Revision:
- 2:ee75bb401e31
- Parent:
- 1:15adfb7ee64c
diff -r 15adfb7ee64c -r ee75bb401e31 trapezoidalMotionCal.h --- a/trapezoidalMotionCal.h Thu Aug 03 12:42:12 2017 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ - -#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 -