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
Revision 58:f84bd22fd586, committed 2017-06-06
- Comitter:
- YusukeWakuta
- Date:
- Tue Jun 06 13:26:03 2017 +0000
- Branch:
- mpu????????
- Parent:
- 57:d7b709dd1c4f
- Child:
- 59:f007e543f8c9
- Commit message:
- ???????????????
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat May 13 15:20:02 2017 +0000
+++ b/main.cpp Tue Jun 06 13:26:03 2017 +0000
@@ -20,14 +20,14 @@
#define ERURON_MOVE_DEG_INI_R 18.0 //degree
#define DRUG_MOVE_DEG_INI_R 0.49
#define ERURON_TRIM_INI_R 0.38 //値lowerすると頭上げ
-#define DRUG_TRIM_INI_R 0.37
+#define DRUG_TRIM_INI_R 0.37
#define ERURON_MOVE_DEG_INI_L -19.4 //degree
#define DRUG_MOVE_DEG_INI_L -0.44
-#define ERURON_TRIM_INI_L 0.402 // 値をお大きいくすると頭上げ
-#define DRUG_TRIM_INI_L 0.68//値を小さくすると開く側
+#define ERURON_TRIM_INI_L 0.402 // 値をお大きいくすると頭上げ
+#define DRUG_TRIM_INI_L 0.73//値を小さくすると開く側
-#define PHASE_NUM 15 //奇数にしてください。そしてメインコードと必ず同じ値にしてください
+#define PHASE_NUM 7 //奇数にしてください。そしてメインコードと必ず同じ値にしてください
#define NEUTRAL_PHASE (PHASE_NUM + 1) / 2.0
/*ドラッグラダー
@@ -279,7 +279,7 @@
{
drugServo.pulsewidth(calcPulse(drugTrim + drugMoveDeg *(float)controlValues[sizeof(int) + 2]));
eruronServo.pulsewidth(calcPulse( eruronTrim + eruronMoveDeg * (eruronint - NEUTRAL_PHASE)/(PHASE_NUM-NEUTRAL_PHASE)));
- pc.printf("WriteNum:%f ",calcPulse( eruronTrim + eruronMoveDeg * (1.0/PHASE_NUM) * eruronint));
+ pc.printf("WriteNum:%f ef:%d ",calcPulse( eruronTrim + eruronMoveDeg * (1.0/PHASE_NUM) * eruronint),eruronint);
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));
}
