ロボステ6期 / SpeedController___2_25

Dependencies:   Encoder

Dependents:   NHK2020-m2-2-ros_2_25

Files at this revision

API Documentation at this revision

Comitter:
yuki0701
Date:
Tue Feb 25 01:24:31 2020 +0000
Parent:
7:b1708b8819f1
Commit message:
a

Changed in this revision

SpeedController.cpp Show annotated file Show diff for this revision Revisions of this file
SpeedController.h Show annotated file Show diff for this revision Revisions of this file
--- a/SpeedController.cpp	Sat Aug 10 05:36:57 2019 +0000
+++ b/SpeedController.cpp	Tue Feb 25 01:24:31 2020 +0000
@@ -26,11 +26,11 @@
 }
 
 
-void SpeedControl::Sc(double target_omega)        //スカンジウムじゃないよ
+void SpeedControl::Sc(double target_omega,int flag,double omega)        //スカンジウムじゃないよ
 {
     double t=ec_->timer_.read();
-    ec_->calOmega();
-    double omega=ec_->getOmega();
+    //ec_->calOmega();
+    //double omega=ec_->getOmega();
     double diff=target_omega-omega;
     double pid=Kp_*diff+Kd_*(diff-pre_diff)/(t-ptsc_);
     double duty;
--- a/SpeedController.h	Sat Aug 10 05:36:57 2019 +0000
+++ b/SpeedController.h	Tue Feb 25 01:24:31 2020 +0000
@@ -146,7 +146,7 @@
     *
     *   (どんなプログラムにも言えるが、)そのためこのようなprintfの頻度を少なくさせるような工夫が必要になる。
     */
-    void Sc(double target_omega);
+    void Sc(double target_omega,int flag,double omega);
     /** モーター停止用関数
     *   dutyを0にする
     */