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 ADXL345_I2C mbed MPU6050
Fork of Souda_Yokutan_ver528TF by
Revision 53:3eeaafa49707, committed 2017-03-31
- Comitter:
- tsumagari
- Date:
- Fri Mar 31 13:45:21 2017 +0000
- Branch:
- mpu????????
- Parent:
- 51:eafff055a3f4
- Child:
- 54:113656a959b7
- Commit message:
- 3.31????
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Mar 31 08:08:37 2017 +0000
+++ b/main.cpp Fri Mar 31 13:45:21 2017 +0000
@@ -17,17 +17,17 @@
#define MPU_DELT_MIN 250
#define ERURON_MOVE_DEG_INI_R 0.45
-#define DRUG_MOVE_DEG_INI_R -0.07
+#define DRUG_MOVE_DEG_INI_R 0.49
#define ERURON_TRIM_INI_R 0.41
-#define DRUG_TRIM_INI_R 0.62
+#define DRUG_TRIM_INI_R 0.37
-#define ERURON_MOVE_DEG_INI_L 0.35
-#define DRUG_MOVE_DEG_INI_L -0.10
-#define ERURON_TRIM_INI_L 0.4
+#define ERURON_MOVE_DEG_INI_L 0.45
+#define DRUG_MOVE_DEG_INI_L -0.44
+#define ERURON_TRIM_INI_L 0.48 // 値をお大きいくすると頭上げ
#define DRUG_TRIM_INI_L 0.68//値を小さくすると開く側
-#define PHASE_NUM 13.0 //奇数にしてください。そしてメインコードと必ず同じ値にしてください
-#define NEUTRAL_PHASE 7.0
+#define PHASE_NUM 15.0 //奇数にしてください。そしてメインコードと必ず同じ値にしてください
+#define NEUTRAL_PHASE 8.0
/*ドラッグラダー
初期値 0.65
@@ -236,14 +236,15 @@
double calcPulse(float analog)
{
- double min = 0.0006;
- double max = 0.00240;
- if(analog >= max)
- analog = max;
- else if(analog <= min)
- analog = min;
-
- return (min+(analog)*(max-min));
+ return (0.0006 + (analog)*(0.00240-0.00060) );
+// double min = 0.0006;
+// double max = 0.00240;
+// if(analog >= max)
+// analog = max;
+// else if(analog <= min)
+// analog = min;
+//
+// return (min+(analog)*(max-min));
/*
int start=510, end=2390;
while(1) {
