2014 sift / Mbed 2 deprecated TVDctrller2017_brdRev1_PandA

Dependencies:   mbed

Fork of TVDctrller2017_brdRev1_ver6 by 2014 sift

Revision:
39:c05074379713
Parent:
38:11753ee9734f
Child:
40:8e33c60c6590
--- a/Global.h	Tue Oct 24 10:19:51 2017 +0000
+++ b/Global.h	Thu Oct 26 02:04:02 2017 +0000
@@ -2,8 +2,9 @@
 #define GLOBAL_H
 
 //制御周期
-const int CONTROL_CYCLE_MS  = 10;
-const float CONTROL_CYCLE_S     = 0.01;
+const float CONTROL_CYCLE_S = 0.01f;
+const int CONTROL_CYCLE_MS  = (int)(CONTROL_CYCLE_S * 1000.0f);
+const int CONTROL_CYCLE_US  = (int)(CONTROL_CYCLE_S * 1000000.0f);
 
 const float LSB_MOTORSPEED      = 0.01;     //[(m/s) / bit]
 
@@ -24,9 +25,9 @@
     LEFT
 };
 
-#define M_PI            3.1415f //[-]
+const float M_PI            =3.1415f;   //[-]
 
-#define ratioLPF        0.67f  //各センサLPF:CutOff:20Hz
+#define ratioLPF        0.67f           //各センサLPF:CutOff:20Hz
 
 #define myAbs(x)    (((x)>0)?(x):(-(x)))