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_36 by
Diff: main.cpp
- Revision:
- 6:ed61ed8b8fab
- Parent:
- 5:9efd35c9bb2e
- Child:
- 7:53b0eb6f6bd3
diff -r 9efd35c9bb2e -r ed61ed8b8fab main.cpp
--- 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);    
    