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.
Fork of DCmotor2 by
Diff: controller.cpp
- Revision:
- 15:29797f995594
- Parent:
- 13:ba71733c11d7
- Child:
- 20:39d919589359
- Child:
- 22:4fd506b1c68d
--- a/controller.cpp Sun Mar 03 09:19:02 2013 +0000
+++ b/controller.cpp Tue Mar 12 05:01:46 2013 +0000
@@ -135,6 +135,7 @@
float e, ed;
e = vl.w_ref - vl.w_lpf; // 速度偏差の計算
+debug[1]=vl.w_ref/2/PI;//[Hz], for debug
vl.eI = vl.eI + TS1*e; // 速度偏差の積分値の計算
@@ -243,7 +244,7 @@
void data2mbedUSB(){ // PC上のmbed USB ディスクにセーブするためのデータをTS3[s]ごとに代入 save data to mbed USB drive
if( _countTS3<1000 ){ // データ数が1,000の5種類のデータをメモリーに貯める
- data[_countTS3][0]=p.th[0]/*vl.w_ref*/; data[_countTS3][1]=debug[0];
+ data[_countTS3][0]=debug[0]; data[_countTS3][1]=debug[1];
data[_countTS3][2]=vl.w_lpf; data[_countTS3][3]=_countTS0*TS0; data[_countTS3][4]=il.v_ref;
_countTS3++;
}
