台形制御用ライブラリ
Dependents: kisoken_PenPlotter
trapezoidalMotionCal.h
00001 00002 #include "mbed.h" 00003 00004 #ifndef __TRAPEZOIDAL_MOTION_CAL_H__ 00005 #define __TRAPEZOIDAL_MOTION_CAL_H__ 00006 00007 00008 class trapezoidalMotionCal{ 00009 00010 public: 00011 00012 trapezoidalMotionCal(double f_start, double f_stop, double f_max, double a_up, double a_down); 00013 00014 void setTarg(int32_t targ); 00015 00016 uint32_t calStepDelay(int32_t steps); 00017 00018 private: 00019 double _f_start; 00020 double _f_stop; 00021 double _f_max; 00022 double _a_up; 00023 double _a_down; 00024 00025 double step_accel; 00026 double step_decel; 00027 double step_const; 00028 double f_reach; 00029 00030 int32_t targSteps; 00031 00032 int shortMode; 00033 int revMode; 00034 00035 }; 00036 00037 00038 00039 00040 #endif 00041
Generated on Mon Aug 15 2022 17:10:42 by 1.7.2