2017年度の製作を開始します

Dependencies:   mbed mbed-rtos

Fork of Control_Main_Full_20160608 by albatross

Branch:
?????
Revision:
53:947eff37d01d
Parent:
52:a9d23be503c6
Child:
54:65e6baedec04
--- a/InputHandler/InputHandler.cpp	Sat Jun 10 07:43:58 2017 +0000
+++ b/InputHandler/InputHandler.cpp	Thu Jun 15 05:44:18 2017 +0000
@@ -17,11 +17,12 @@
 
 void InputCalc::setNeutral(float input)
 {
-    float sum = 0.0;
-    for (int i = 0; i < NEUTRAL_SUM_NUM ; i++) {
-        sum += input;
-    }
-    rawNeu = sum / NEUTRAL_SUM_NUM;
+//    float sum = 0.0;
+//    for (int i = 0; i < NEUTRAL_SUM_NUM ; i++) {
+//        sum += input;
+//    }
+//    rawNeu = sum / NEUTRAL_SUM_NUM;
+    rawNeu = input;
 }
 
 void InputCalc::setMaxAndMin(double input)
@@ -39,11 +40,6 @@
     shiftedMin = rawMin - rawNeu;
 }
 
-float InputCalc::GetUpperAndLowerRate()
-{
-    return shiftedMax / (-shiftedMin);
-}
-
 //シフトした後の値を-1.0~1.0へと正規化するための比率を取得します
 void InputCalc::GetNormRate()
 {
@@ -54,8 +50,6 @@
 //値を-1.0~1.0へと正規化します
 void InputCalc::NormValue(float *input)
 {
-    if(*input< 0.0)
-        *input *= GetUpperAndLowerRate();
     *input -= rawNeu;
     if (*input > 0.0)
         *input *= upperShiftRate;
@@ -94,5 +88,6 @@
     GetNormRate();
     NormValue(&input);
     WidenNeutral(&input);
-    return  CutInvalidInput(input);
+    return input;
+    //return  CutInvalidInput(input);
 }
\ No newline at end of file