今までのジョイスティックの入力を段階分けしていた方式から、アナログ値をできる限りそのまま使用する方式に変更しました。

Dependencies:   mbed-rtos mbed

Fork of ControlMain2017 by albatross

Branch:
?????
Revision:
48:2965c51ef540
Parent:
47:6f84dcf7d1d8
diff -r 6f84dcf7d1d8 -r 2965c51ef540 ValueProcessor.cpp
--- a/ValueProcessor.cpp	Sat May 13 15:20:43 2017 +0000
+++ b/ValueProcessor.cpp	Fri Jun 02 05:21:47 2017 +0000
@@ -152,7 +152,6 @@
 
 void ValueProcess::Processing(float rollRead,float pitchRead,int* input_R,int* input_L)
 {
-
     setMaxAndMin(enumRoll, rollRead);
     setMaxAndMin(enumPitch, pitchRead);
 
@@ -166,10 +165,10 @@
 
     int phased_R=PhaseFloat(Formated_R,SetRollPitchRacio(pitchNeutral + pitchUpperDiff,rollNeutral + rollUpperDiff),SetRollPitchRacio(pitchNeutral + pitchLowerDiff,rollNeutral + rollLowerDiff));
     // *input_R = WidenNeutral(phased_R);
-    *input_R = phased_R;
+    *input_R = phased_R;//WidenNeutral( phased_R);
     float Formated_L = Format2Range(SetRollPitchRacio(MatchedPitch, - MatchedRoll),SetRollPitchRacio(pitchNeutral + pitchUpperDiff,-rollNeutral - rollLowerDiff),SetRollPitchRacio(pitchNeutral  +pitchLowerDiff, - rollNeutral - rollUpperDiff));
     int phased_L = PhaseFloat(Formated_L,SetRollPitchRacio(pitchNeutral + pitchUpperDiff ,- rollNeutral - rollLowerDiff),SetRollPitchRacio(pitchNeutral + pitchLowerDiff ,- rollNeutral - rollUpperDiff));
-    *input_L = WidenNeutral(phased_R);
+    *input_L = phased_L;             // WidenNeutral(phased_L);
 
     if(*input_R < 1)
         *input_R = 1;
@@ -179,4 +178,4 @@
         *input_L = 1 ;
     else if(*input_L > PHASE_NUM)
         *input_L =PHASE_NUM;
-}
+}
\ No newline at end of file