ec
Fork of EC by
Diff: EC.h
- Revision:
- 10:216d5a573dc7
- Parent:
- 9:a919aa92e65e
- Child:
- 12:530f6184830a
--- a/EC.h Mon Nov 28 13:01:04 2016 +0000 +++ b/EC.h Tue Nov 29 12:45:45 2016 +0000 @@ -26,13 +26,12 @@ int rev; double now_time,old_time; double RPM,RPM_old; + int RPM_th; InterruptIn signalA_; InterruptIn signalB_; InterruptIn signalZ_; - Timer timer; - void upA(); void downA(); void upB(); @@ -134,6 +133,8 @@ * @endcode */ double getRPM(); + + void changeRPM_th(int th); ///角速度計算の間隔 @@ -141,7 +142,7 @@ ///エンコーダの分解能のデフォルト値 static int defsolution; - + Timer timer; }; @@ -190,7 +191,8 @@ double Kv_p,Kv_d,Kv_i; double diff,diff_old,integral; double out_duty,out; - double now_RPM; + double now_omega,now_RPM; + double now_time_,old_time_; //Serial pc(USBTX,USBRX); protected: