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
Diff: SpeedController.h
- Revision:
- 2:77256385cf03
- Parent:
- 0:de44976b7670
- Child:
- 3:58a298386879
--- a/SpeedController.h Fri Aug 09 06:09:31 2019 +0000
+++ b/SpeedController.h Fri Aug 09 06:19:05 2019 +0000
@@ -68,7 +68,7 @@
*
* 引数はそれぞれp,dパラメータ
*
- * パラメーター値は実験的に頑張って求めるしかないです
+ * パラメーター値は実験的に頑張って求めるしかない
* @param kp p制御パラメータ
* @param kd d制御パラメータ
*/
@@ -82,6 +82,10 @@
* @param db 角速度[rad/s]とduty比の関係式の切片(逆転時)
*/
void setEquation(double cf,double df,double cb,double db);
+ /** 出力duty比の上限を決める関数
+ * 0 ~ 0.95の範囲内で設定する
+ * @param duty_limit 出力duty比の上限
+ */
void setDutyLimit(double duty_limit);
/** モーター停止用関数
@@ -90,6 +94,7 @@
void stop();
/** duty(-1 ~ 1)比でモーターを回転させる関数
* 負の値を入れたら逆回転する
+ * @param duty 出力duty比
*/
void turn(double duty);
///Encoderや速度制御の値をresetする関数