Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Encoder
Revision 11:1f6b35a255f2, committed 2020-02-25
- Comitter:
- yuki0701
- Date:
- Tue Feb 25 01:21:51 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:21:51 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:21:51 2020 +0000
@@ -146,7 +146,7 @@
*
* (どんなプログラムにも言えるが、)そのためこのようなprintfの頻度を少なくさせるような工夫が必要になる。
*/
- void Sc(double target_omega);
+ void Sc(double target_omega,int flag,double omega);
/** モーター停止用関数
* dutyを0にする
*/