9/14 14:57

Dependencies:   HCSR04_2 MPU6050_2 mbed SDFileSystem3

Fork of Autoflight2018_11 by 航空研究会

Files at this revision

API Documentation at this revision

Comitter:
HARUKIDELTA
Date:
Fri Sep 14 05:56:59 2018 +0000
Parent:
7:53b0eb6f6bd3
Commit message:
a

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
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]);