確認用

Dependencies:   HCSR04_2 MPU6050_2 mbed SDFileSystem3

Fork of Autoflight2018_29 by 航空研究会

Revision:
6:ed61ed8b8fab
Parent:
5:9efd35c9bb2e
Child:
7:53b0eb6f6bd3
--- a/main.cpp	Thu Sep 13 12:33:54 2018 +0000
+++ b/main.cpp	Thu Sep 13 13:05:22 2018 +0000
@@ -947,13 +947,14 @@
         flg_setInStartAuto = false;
         led2 = 0;
     }
-    
+    autopwm[THR]=oldTHR;
+
     newYaw_Moebius = TranslateNewYaw(nowAngle[YAW], FirstYAW_Moebius);
 
     if(RotateCounter == 0 && newYaw_Moebius >90.0 && newYaw_Moebius < 180.0)    {RotateCounter++; led2 = 1; pc.printf("Rotate 90\r\n");}
     if(RotateCounter == 1 && newYaw_Moebius >-180.0 && newYaw_Moebius < -90.0)  {RotateCounter++; led2 = 0; pc.printf("Rotate 180\r\n");}
-    if(RotateCounter == 2 && newYaw_Moebius >-90.0 && newYaw_Moebius < 10.0f)   {RotateCounter++; led2 = 1; pc.printf("Rotate 270\r\n");}
-    if(RotateCounter == 3 && newYaw_Moebius >20.0 && newYaw_Moebius < 180.0f)     {RotateCounter++; led2 = 0; pc.printf("Change Rotate direction\r\n");}
+    if(RotateCounter == 2 && newYaw_Moebius >-90.0 && newYaw_Moebius <-10.0)   {RotateCounter++; led2 = 1; pc.printf("Rotate 270\r\n");}
+    if(RotateCounter == 3 && newYaw_Moebius >0.0 && newYaw_Moebius < 90.0)     {RotateCounter++; led2 = 0; pc.printf("Change Rotate direction\r\n");}
 
 
     if(RotateCounter <= 3) UpdateTargetAngle_Rightloop_short(targetAngle);