2014 sift / Mbed 2 deprecated TVDctrller2017_brdRev1_PandA

Dependencies:   mbed

Fork of TVDctrller2017_brdRev1_ver6 by 2014 sift

Revision:
25:c21d35c7f0de
Child:
28:47e9531a3a9d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Global.h	Sat Jul 01 00:26:28 2017 +0000
@@ -0,0 +1,38 @@
+#ifndef GLOBAL_H
+#define GLOBAL_H
+
+//制御周期
+const int CONTROL_CYCLE_MS  = 10;
+const float CONTROL_CYCLE_S     = 0.01;
+
+//エラーカウンタ型
+struct errCounter_t {
+    int apsUnderVolt;       //aps電圧不足
+    int apsExceedVolt;      //aps電圧超過
+    int apsErrorTolerance;  //aps偏差超過
+    int apsStick;           //aps固着
+    int brakeUnderVolt;     //brake電圧不足
+    int brakeExceedVolt;    //brake電圧超過
+    int brakeFuzzyVolt;     //brake曖昧な電圧(ONでもOFFでもない)
+    int brakeOverRide;      //accel-brake同時踏み
+};
+
+enum SelectMotor {
+    RIGHT_MOTOR=0,
+    LEFT_MOTOR
+};
+
+#define M_PI            3.1415f //[-]
+
+#define ratioLPF        0.061f  //各センサLPF:CutOff:1Hz
+#define ratioLPF_V      0.061f  //車速LPF:CutOff:1Hz(sampling:10ms)
+
+#define myAbs(x)    ((x>0)?(x):(-(x)))
+
+#define TVD_GEAR_RATIO  10.0f   //[-]
+#define TIRE_DIAMETER   0.533f  //[m]
+#define WHEEL_BASE      1.760f  //[m]
+#define TREAD           1.3f    //[m]
+#define STABIRITY_FACTOR    0.01f   //[-]
+
+#endif
\ No newline at end of file