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: HCSR04_2 MPU6050_2 mbed SDFileSystem3
Fork of Autoflight2018_49 by
Diff: main.cpp
- Revision:
- 8:66bba39b95a9
- Parent:
- 7:53b0eb6f6bd3
- Child:
- 9:f6367b7fd7be
diff -r 53b0eb6f6bd3 -r 66bba39b95a9 main.cpp
--- a/main.cpp Thu Sep 13 13:35:38 2018 +0000
+++ b/main.cpp Fri Sep 14 05:56:59 2018 +0000
@@ -60,6 +60,15 @@
#define AIL_L_correctionleftloopshort 0
#define glideloopRUD 1300
+#define RIGHTLOOP_RUD 1250
+#define RIGHTLOOPSHORT_RUD 1250
+#define LEFTLOOP_RUD 1500
+#define LEFTLOOPSHORT_RUD 1500
+#define GLIDELOOP_RUD 1300
+#define AIL_L_CORRECTION_RIGHTLOOP 0
+#define AIL_L_CORRECTION_RIGHTLOOPSHORT 0
+#define AIL_L_CORRECTION_LEFTLOOP 0
+#define AIL_L_CORRECTION_LEFTLOOPSHORT 0
#define GLIDE_ROLL -12.0
#define GLIDE_PITCH -3.0
@@ -745,7 +754,7 @@
addpwm[ROLL] = (float)GAIN_CONTROLVALUE_TO_PWM * controlValue[ROLL]; //センサ:右回転正(8月13日時点;左回転が正!) レバー:右回転正
autopwm[ELE] = trimpwm[ELE] + reverce[ELE] * addpwm[PITCH]; //rewrite
- autopwm[AIL_R] = trimpwm[AIL_R] + reverce[AIL_R] * addpwm[ROLL];
+ autopwm[AIL_R] = trimpwm[AIL_R] - reverce[AIL_R] * addpwm[ROLL];
//autopwm[THR] = oldTHR;
autopwm[ELE] = ThresholdMaxMin(autopwm[ELE], maxpwm[ELE], minpwm[ELE]);
