2014 sift / Mbed 2 deprecated TVDctrller2017_brdRev1_PandA

Dependencies:   mbed

Fork of TVDctrller2017_brdRev1_ver6 by 2014 sift

Revision:
6:26fa8c78500e
Parent:
5:a5462959b3ab
Child:
8:a22aec357a64
--- a/TVDcontrolDEMO_main.cpp	Mon Jul 25 07:12:49 2016 +0000
+++ b/TVDcontrolDEMO_main.cpp	Tue Jul 26 05:12:15 2016 +0000
@@ -47,7 +47,7 @@
 
     RTDSW.mode(PullUp);
     SDState.mode(PullUp);
-    
+
     indicateSystem(1);
     bootSystem();
 }
@@ -55,7 +55,7 @@
 int main(void)
 {
     pc.baud(115200);
-    
+
     printf("\r\nVersion:TVDcontrolDEMO...start!!!!!\r\n");
 
     initIO();       //IOポート初期化
@@ -65,21 +65,21 @@
     initSteering();
 
     timer.start();
-    
+
     float time;
 
     while(1) {
         //struct errCounter_t eCounter={0,0,0,0,0,0,0,0};
 
         //getCurrentErrCount(&eCounter);
-        
+
         timer.reset();
 
         driveTVD();
-        
+
         //printf("%f\n\r", 45.0/0xFFFF * calcRequestTorque());
-        
-        printf("%1.2f\t%d\t%1.6f\t%1.5f\r\n", 45.0f / 0xffff * calcRequestTorque(), getPulseTime(RIGHT_MOTOR), time, getSteerAngle());
+
+        printf("%1.2f\t%d\t%1.6f\t%1.5f\r\n", 45.0f / 0xffff * calcRequestTorque(), (int)(1.0/(getPulseTime(RIGHT_MOTOR)*0.000001)*60.0), time, getSteerAngle());
         //printf("%1.6f\r\n", time);
         time = timer.read();