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 51:eafff055a3f4, committed 2017-03-31
- Comitter:
- YusukeWakuta
- Date:
- Fri Mar 31 08:08:37 2017 +0000
- Branch:
- mpu????????
- Parent:
- 50:b3a8f8e88c50
- Child:
- 53:3eeaafa49707
- Commit message:
- ????13???
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Mar 29 04:52:00 2017 +0000
+++ b/main.cpp Fri Mar 31 08:08:37 2017 +0000
@@ -26,7 +26,8 @@
#define ERURON_TRIM_INI_L 0.4
#define DRUG_TRIM_INI_L 0.68//値を小さくすると開く側
-#define PHASE_NUM 12.0 //奇数にしてください。そしてメインコードと必ず同じ値にしてください
+#define PHASE_NUM 13.0 //奇数にしてください。そしてメインコードと必ず同じ値にしてください
+#define NEUTRAL_PHASE 7.0
/*ドラッグラダー
初期値 0.65
@@ -255,7 +256,7 @@
void WriteServo()
{
drugServo.pulsewidth(calcPulse(drugTrim + drugMoveDeg *(float)controlValues[sizeof(int) + 2]));
- eruronServo.pulsewidth(calcPulse( eruronTrim + eruronMoveDeg * (1.0/PHASE_NUM) * (eruronint - 6.0)));
+ 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("raw:%f sampled:%f\n\r",eruronfloat /3.0,SampleFloat(eruronfloat / 3.0));
