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.
Dependencies: Control_Yokutan_CANver1 XBusServo mbed mbed-rtos
Fork of ControlYokutan2017_2 by
Diff: main.cpp
- Branch:
- mpu????????
- Revision:
- 55:eaff0c602c99
- Parent:
- 54:113656a959b7
- Child:
- 56:2b947d31d307
--- a/main.cpp Sun Apr 02 01:58:05 2017 +0000
+++ b/main.cpp Fri Apr 21 04:53:50 2017 +0000
@@ -18,16 +18,16 @@
#define ERURON_MOVE_DEG_INI_R 0.45
#define DRUG_MOVE_DEG_INI_R 0.49
-#define ERURON_TRIM_INI_R 0.50 //値36werすると頭上げ
+#define ERURON_TRIM_INI_R 0.41 //値36werすると頭上げ
#define DRUG_TRIM_INI_R 0.37
#define ERURON_MOVE_DEG_INI_L -0.45
#define DRUG_MOVE_DEG_INI_L -0.44
-#define ERURON_TRIM_INI_L 0.37 // 値をお大きいくすると頭上げ
+#define ERURON_TRIM_INI_L 0.48 // 値をお大きいくすると頭上げ
#define DRUG_TRIM_INI_L 0.68//値を小さくすると開く側
-#define PHASE_NUM 15.0 //奇数にしてください。そしてメインコードと必ず同じ値にしてください
-#define NEUTRAL_PHASE 8.0
+#define PHASE_NUM 13.0 //奇数にしてください。そしてメインコードと必ず同じ値にしてください
+#define NEUTRAL_PHASE 7.0
/*ドラッグラダー
初期値 0.65
@@ -67,7 +67,7 @@
float drugTrim;
float eruronMoveDeg;
float drugMoveDeg;
-int eruronint = 1;
+int eruronint = NEUTRAL_PHASE;
unsigned short ina_val;
double V,C;
bool SERVO_FLAG;
@@ -259,7 +259,7 @@
drugServo.pulsewidth(calcPulse(drugTrim + drugMoveDeg *(float)controlValues[sizeof(int) + 2]));
eruronServo.pulsewidth(calcPulse( eruronTrim + eruronMoveDeg * (1.0/PHASE_NUM) * (eruronint - NEUTRAL_PHASE)));
pc.printf("WriteNum:%f ",calcPulse( eruronTrim + eruronMoveDeg * (1.0/PHASE_NUM) * eruronint));
- pc.printf("drValue::%f ef::%f\n\r",drugTrim + drugMoveDeg *(float)controlValues[sizeof(int) + 2],eruronTrim + eruronMoveDeg * (1.0/PHASE_NUM) * (eruronint - 6.0));
+ pc.printf("drValue::%f ei::%f\n\r",drugTrim + drugMoveDeg *(float)controlValues[sizeof(int) + 2],eruronTrim + eruronMoveDeg * (1.0/PHASE_NUM) * (eruronint - NEUTRAL_PHASE));
// pc.printf("raw:%f sampled:%f\n\r",eruronfloat /3.0,SampleFloat(eruronfloat / 3.0));
}
