Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ControlMain2017 by
Revision 48:2965c51ef540, committed 2017-06-02
- Comitter:
- YusukeWakuta
- Date:
- Fri Jun 02 05:21:47 2017 +0000
- Branch:
- ?????
- Parent:
- 47:6f84dcf7d1d8
- Commit message:
- valueprocessor??????push; ;
Changed in this revision
--- 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
--- a/ValueProcessor.h Sat May 13 15:20:43 2017 +0000 +++ b/ValueProcessor.h Fri Jun 02 05:21:47 2017 +0000 @@ -3,7 +3,7 @@ #include "mbed.h" -#define PHASE_NUM 15 //奇数にしてください。翼端コードと合わせないといけないのは、この値です +#define PHASE_NUM 7 //奇数にしてください。翼端コードと合わせないといけないのは、この値です #define ADDITIONALPHASE 2 #define SUM_UP_NUM 10.0 class ValueProcess
--- a/main.cpp Sat May 13 15:20:43 2017 +0000
+++ b/main.cpp Fri Jun 02 05:21:47 2017 +0000
@@ -65,7 +65,7 @@
void InputControlValues()
{
VP.Processing(rollPin.read(),pitchPin.read(),(int *)inputDatas_R,(int *)inputDatas_L);
- pc.printf("R:%d L:%d show Both Right\n\r",*(int *)inputDatas_R,*(int *)inputDatas_L);
+ pc.printf("R:%d L:%d show Both Right %d %d\n\r",*(int *)inputDatas_R,*(int *)inputDatas_L,drug_R.read(), drug_L.read());
inputDatas_R[sizeof(int)+ 2] = (char)drug_R;
inputDatas_L[sizeof(int)+2] = (char)drug_L;
led4 =! led4;
